Method and apparatus for creating a simulated particle pack

ABSTRACT

A machine-implemented method is provided for placing a plurality of particles to create a simulated particle pack. The method comprises defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories, selecting a particle from the plurality of particles, and placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles. The selected particle placement includes defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles. The selected particle placement further includes defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles. The selected particle is placed in non-overlapping relation with respect to the catch net and the water level. The method further includes positioning the water level within the space based upon the smaller particle surface. The particle selection and placement procedures are repeated until a desired number of particles have been placed. Related apparatus also are disclosed.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to computerized methods and apparatus for creating particle packs and, more specifically, to computerized methods and apparatus for creating particle packs with enhanced speed and processing efficiency.

[0003] 2. Description of the Related Art

[0004] The present invention relates to the creation of particle packs that can be used to model or simulate particle containing or particle filled systems. There are many varieties of particle containing systems. Specific yet merely illustrative examples are found in the fields of asphalts, concretes, ceramics, soils, chemical physics of amorphous materials, slurry mechanics, and solid propellants or gas generators. An important class of such systems comprises polymeric materials with particles embedded or embodied in the polymer body or binder.

[0005] It is highly desirable in many circumstances to have a capability to model or simulate the properties, performance, etc. of such particle containing systems. In designing such particle filled systems, for example, substantial trial and error can be avoided if one is able to use a model or simulation to assess the implications of making changes in the components, their configuration, the conditions, etc.

[0006] This is particularly true in microstructural analyses, e.g., wherein the analysis focuses on the material at a highly magnified level, such as at the molecular or grain stages. A specific example of microstructural analysis would involve the modeling or simulation of a particle pack for a propellant, which typically would include fuel and oxidizer particles in a polymeric binder. When modeling or simulating a particle containing system, it has become customary to construct an analytical replica or representation of the particle filled material, which is generally referred to as a particle pack. The term “particle pack” has come to be used in the field to refer generally to a collection of particles in a defined volume.

[0007] The general object in creating particle packs is to model or simulate the manner in which a plurality of particles, usually a large number of such particles, will fill or otherwise occupy a particular space. The nature of the particles may vary, in some cases considerably, depending on the particular application. These variations may include particle size variations, as well as other characteristics.

[0008] The complexity of models used to simulate real world particle containing systems increases dramatically if more than a limited number of variables are considered. The numbers of interactions, combinations and permutations brought to bear by anything other than relatively simple systems causes the processing requirements to become unwieldy even for the most advanced computer systems. This complexity and processing requirement limitation is even more pronounced for systems that employ large numbers of particles.

[0009] These limitations have caused workers in the field to invoke various simplifying assumptions to render the problem more workable. One such assumption involves the shape of the particle. The complexity and related processing demands can be substantially reduced, for example, if one assumes that the particles are spherical.

[0010] The general approach to simulating particle containing systems in the past has involved a more rigorous one in which a particle pack is constructed by placing the individual particles into a three dimensional volume, i.e., into a “full field.” This approach in theory offers promise for accurate simulation of the real particle containing systems. The large number of particles required to construct a statistically meaningful or useful particle pack, however, usually renders this approach impractical. The processing power required to construct such a particle pack is prohibitive for all but extremely small numbers of particles, and only relatively small variations in particle size.

[0011] The simplifying assumptions necessary to reduce processing demands down to a manageable level can prevent the resulting particle pack from accurately portraying the actual packs that are intended to be simulated.

[0012] An approach that has been used to make the processing demands more manageable and yet the accuracy and reliability of the simulation to be good involves a reduced dimension approach. An example of this approach is described in I. Lee Davis and Roger G. Carter, “Random Particle Packing by Reduced Dimension Algorithms,” J.'. Appl. Phys., 67(2), Jan. 15, 1990 pp. 1022-1029 (hereinafter “Davis and Carter”). The reduced dimension approach as described there involves simplifying the pack construction problem by employing the principle that an arbitrary straight line drawn through a uniformly random three-dimensional particle pack (regardless of whether the particles are spheres) will, on the average, lie inside particles the same fraction of its length as the packing fraction. As the length of the line goes to infinity, the fraction of its length residing inside the particles of a random pack goes to the packing fraction exactly. The line is referred to in Davis and Carter as a “central string.” This approach has proven quite useful in enabling more complicated particle packs to be constructed. It can accommodate a substantially wider range of particle sizes.

[0013] Notwithstanding the usefulness of the reduced dimension approach to constructing particle packs, its direct application has been limited to a certain extent in that its accuracy can be compromised by considering only particles intersected by the central string. In real three-dimensional packs, and assuming the particles are spherical, each sphere initially intersecting the central sphere, as it slides down the central string during placement, comes to rest more often on a “nearest-neighbor” sphere than on a lower central string particle. The sphere then would roll away from the central string, thereby spreading the spheres over a greater distance along the central string.

[0014] A technique for addressing this limitation, also presented in the Davis and Carter paper noted above, involves relaxing the requirement that spheres must intersect the central. Under this modified approach, particles are permitted to come to rest within a defined range of the central string, after assuming that their path is modified to encounter and avoid previously placed spheres. This is referred to generally as “perturbation,” or perturbed central string packing.

[0015] This modified reduced dimension approach also has been limited, however, in that, when perturbation approaches are used, processing demands once again increase, in some cases substantially. This can give rise to a fuller and more complicated particle field that once again begins to approach the complexity and processing intensity of a full field.

OBJECTS OF THE INVENTION

[0016] Accordingly, an object of the present invention is to provide apparatus and methods for creating a particle pack that simulate the actual particle distribution within a space with a reasonable degree of accuracy.

[0017] Another object of the invention is to provide apparatus and methods for creating a particle pack that involve reduced processing demands and increased processing efficiency relatively to full field simulation.

[0018] Additional objects and advantages of the invention will be set forth in the description that follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations pointed out in the appended claims.

SUMMARY OF THE INVENTION

[0019] To achieve the foregoing objects, and in accordance with the purposes of the invention as embodied and broadly described in this document, a machine-implemented method is provided for placing a plurality of particles, each having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases. The method comprises a) defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) selecting a particle from the plurality of particles; c) placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement according to one aspect of the invention includes defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles. The selected particle placement according to another aspect of the invention includes defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface. The selected particle being placed in non-overlapping relation with respect to the catch net and the water level; and d) repeating the particle selection (b) and placement (c) until each of the particles of the plurality of particles has become one of the placed particles.

[0020] In accordance with preferred but optional implementations of the invention, the following may apply. The particles comprise spheres and the characteristic dimension of each of the particles comprises a radius. The central string comprises a line within the space, preferably the z axis of a rectilinear coordinate system imposed within the space. Each of the subspaces has a characteristic dimension that corresponds to the characteristic dimension of the particles of the corresponding subspace. Each of the subspaces may comprises a cylinder. The subspaces comprise concentric cylinders disposed about the central string, each of the cylinders defining one of the subspaces and having a radius that corresponds to the radius of the particles in the category corresponding to that cylinder. The particle selection may comprise selecting the particles randomly or selecting the selected particle from a distribution of the particles.

[0021] In accordance with another aspect of the invention, an apparatus is provided for placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases. The apparatus comprises a) an input device for inputting particle selection information; b) a storage device operatively coupled to the input device for storing the particle selection information; c) a processor for selecting a particle from the plurality of particles, for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, and for establishing a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the processor placing the selected particle being placed in non-overlapping relation with respect to the catch net.

[0022] In accordance with another aspect of the invention, a machine-readable medium is provided for use in placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increase. The machine-readable medium comprises a) machine executable instructions for defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b)machine executable instructions for selecting a particle from the plurality of particles; c) machine executable instructions for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement instructions including instructions for defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the selected particle being placed in non-overlapping relation with respect to the catch net; and d) machine executable instructions for repeating the particle selection (b) and placement (c) instructions until each of the particles of the plurality of particles has become one of the placed particles.

[0023] In accordance with another aspect of the invention, an apparatus is provided for placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the apparatus comprises a) an input device for inputting particle selection information; b) a storage device operatively coupled to the input device for storing the particle selection information; c) a processor for selecting a particle from the plurality of particles, for placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, for establishing a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and for positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the water level.

[0024] In accordance with still another aspect of the invention, a machine-readable medium is provided for use in placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases. The machine-readable medium comprises a) machine executable instructions for defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) machine executable instructions for selecting a particle from the plurality of particles; c) machine executable instructions for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement instructions including instructions for defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the water level; and d) machine executable instructions for repeating the particle selection (b) and placement (c) instructions until each of the particles of the plurality of particles has become one of the placed particles.

BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrates a presently preferred embodiments and methods of the invention and, together with the general description given above and the detailed description of the preferred embodiments and methods given below, serve to explain the principles of the invention.

[0026]FIG. 1 is a pictorial diagram of a computer system which comprises a presently preferred embodiment of the apparatus according to the invention, and upon which the presently preferred version of the inventive method may be carried out.

[0027]FIG. 2 is an illustrative example of a particle pack construction according to the preferred implementation, wherein spherical particles are placed along the central string.

[0028]FIG. 3 shows another illustrative example of a particle pack construction according to the preferred implementation, wherein spherical particles are placed along the central string, but wherein the particles extend more several particle diameters out from the central string.

[0029]FIG. 4 shows a cylindrical space and cylindrical subspaces within it according to the preferred embodiment and the preferred method of the invention.

[0030]FIG. 5 shows an illustrative particle pack constructed using the preferred implementation.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS AND METHODS

[0031] Reference will now be made in detail to the presently preferred embodiments and methods of the invention as illustrated in the accompanying drawings, in which like reference characters designate like or corresponding parts throughout the drawings. It should be noted, however, that the invention in its broader aspects is not limited to the specific details, representative devices and methods, and illustrative examples shown and described in this section in connection with the preferred embodiments and methods. The invention according to its various aspects is particularly pointed out and distinctly claimed in the attached claims read in view of this specification, and appropriate equivalents.

[0032] In accordance with one aspect of the invention, an apparatus is provided for creating a particle pack. In accordance with another aspect of the invention, a machine-implemented method is provided for placing a plurality of particles to create a particle pack.

[0033] A particle as the term is used herein is used according to its common but broad meaning in the field. It includes any type of particle that might be found in particle rigid body of arbitrary shape containing materials. In the preferred implementation, particles comprise rigid or nearly rigid objects of arbitrary.

[0034] It is useful in analyzing particle packs to be able to segregate the particles into categories. A group of substantially identical particles, or a group of particles that for purposes of analysis may be deemed identical, and which group is in some way distinguishable from other groups of particles is called a “mode.” If there is only one type of particle comprising the pack and those particles are identical to each other, or may be assumed to be identical, the pack is said to be “monomodal.” If there are two types of particles, the pack is “bimodal,” and if multiple types of particles are present, it is “multimodal.”

[0035] A mode represents a principal size or type of particle. In practice, particles even within a mode often are not exactly identical, but instead have slight variations. In some instances, for example, each mode can be divided into a size distribution about some mean. The distribution may comprise a number of discrete sizes about that mean. The sets of various particles of a given size or character within a particular mode are called “submodes.” In the presently preferred implementation, if there is no size distribution attached to a particular mode, the submode arrays simply contain the mode data as their first and only entry. Because both modes and submodes theoretically merely involve segregating particles into categories based upon one or more distinguishing characters, modes and submodes are referred to generally herein as “categories.”

[0036] The apparatus according to the invention preferably comprises a computer system 100, such as a commercially available personal computer, small business computer, engineering work station, mainframe, microprocessor, or virtually any other machines with similar processing power, appropriately configured and programmed with computer software or “code” as outlined and described herein for performing the tasks identified herein. It includes a processor 102, storage in the form of RAM 104, a hard drive 106, a compact disk (CD) drive 108, and a drive for diskettes 110, all contained within a cabinet 112. System 100 also includes a monitor 116, a keyboard 118, and a pointing device 120 such as a mouse, track ball or the like. System 100 also may be part of a network, in which case it may include a network connection 122 and network bus 124. The method according to the present invention, in its presently preferred implementations, may be carried out on computer system 100, using the same hardware and software, as described herein with respect to the preferred embodiment of the apparatus according to the invention.

[0037] “Machine” as the term is used herein refers broadly to a computer, processor, microprocessor, a network of such devices, or other apparatus capable of performing processing as described herein. Such machines typically and preferably will comprise a computer, such as computer system 100.

[0038] Overview of the Preferred Implementation

[0039] The method and apparatus according to the presently preferred yet merely illustrative versions of the invention will be described in this document as involving the implementation and execution of a computer program that can be run on a computer system or machine as described above. The preferred versions of the apparatus and methods according to the invention are referred to collectively in this document as the “preferred implementation.”

[0040] The architecture of the preferred implementation is outlined below. In its presently preferred form, it is written in double precision C++ or Fortran 90. This is not, however, limiting. The code may, for example, be written in FORTRAN, or other suitable programming languages. An example of such a computer system is shown in FIG. 1. The code in its preferred version builds a single particle pack and outputs user-specified pack microgeometry and statistics. It is modular and can be disassembled into its component subroutines for use elsewhere.

[0041] In accordance with the apparatus aspect of the invention, an input device is provided for inputting particle selection information, and a storage device operatively coupled to the input device for storing the particle selection information. The information used by the preferred implementation will be described throughout this document. The input device may comprise any one or any combination of several input means, including a network download, the CD reader, a diskette reader, the keyboard, the tracking device, a tape drive, or any other means used for inputting data into a machine capable of implementing these aspects of the invention. The storage device also may comprise any suitable storage means, and may include RAM, the hard drive, an optical storage device, storage devices on a machine operably coupled to or accessible by computer 100, or other suitable storage devices readable by a computer directly or with translation.

[0042] The main program of the preferred implementation comprises seven subroutine calls. The names and functions of these subroutines are as follows: SUBROUTINE NAME SUBROUTINE FUNCTION INITERROR Initializes arrays containing the number of errors, warnings, and notations accumulated during pro- gram execution. It also initializes arrays containing information on how these data are to be displayed. INNAME Looks for and reads an input file named INNAME.INP which contains the names of files containing the input data needed by the preferred implementation to build the user-specified pack and output the requested pack information. If the file INNAME.INP does not exist, default file names are used to find instructions on pack building. Default values are used if user-specified instructions are lacking. If essential instructions are lacking, pack building is aborted and error messages are issued. SETHISTOGRAM Reads the information for the types, quantities, and sizes of particles to be used in constructing the pack. SETCONTROL Reads flags and parameters controlling the con- struction of the pack. Default values are used if files containing these instructions cannot be found. SETOUTPUT Reads flags and parameters controlling the type of pack data to be output. Default values are again used if files containing these instructions cannot be found. PPACK Constructs the particle pack according to instruc- tions read by the previous subroutines. Each time it is called to build a new pack, it initializes all variables and arrays so there will be no interfering data left over from a previous call. OUTSTAT Outputs the user-specified information on pack microgeometry and statistics.

[0043] In summary, the first subroutine (INITERROR) initializes error, warning, and notation arrays and parameters. The next four subroutines (INNAME, SETHISTOGRAM, SETCONTROL, SETOUTPUT) and the seventh subroutine (OUTSTAT) control the reading of building instructions and the output of data. The sixth routine (PPACK) constructs the particle pack. This modularity facilitates incorporation of the code or portions of it into larger calling codes, such as codes using numerical methods or finite element analysis.

[0044] Because in the preferred implementation a substantial amount of information may be used to govern particle pack construction, the manner in which the data used by the software code is categorized in the context of the preferred implementation will now be described. These data categories are placed into common blocks and passed from one code section to another as needed. In the presently preferred implementation, all data about the pack along with building instructions are placed into one of the following categories: DATA BLOCK DESCRIPTION HISTO Governs the types and quantities of particles to be used in constructing the pack, i.e., the particle histogram. CONTROL Contains all parameters and flags controlling how the pack will be built and stored. CURINFO Contains information on the status of the particle currently being placed, such as its position and which other particles it is currently touching. PLACED Contains information on all particles placed so far in the pack including the position, size, and type of each particle. SETOUT Contains the flags and parameters governing what pack statistics are to be generated and how the pack microgeometry and its statistics are to be output. ERRORS Contains the names of errors, warnings, and notations that can occur in program input, execution, and output. It is used to monitor the number of times each error, warning, or notation occurs and records such information in a file and/or to the screen, according to the dictates of the user.

[0045] The Subroutine INITERROR

[0046] In the presently preferred implementations, there are three categories of information, called “advisors,” used to monitor the health of the pack, i.e., to monitor whether any of the pack construction rules, such as the prohibitions against particle overlap, and general requirements for particle distribution in the pack (e.g., homogeneity at the macro level of the random or other specified statistical distributions at the microphone mount level) have been violated. They are contained in the program's error arrays and parameters. The three categories of advisors are errors, warnings, and notations.

[0047] Error advisors are of two kinds, fatal and nonfatal. A fatal error will stop program execution because there is not enough information available to build the pack. Nonfatal errors will not stop the program execution but will use default values in place of erroneous user-data. Therefore, a pack will be built but may not be the kind of pack the user intended.

[0048] Warning advisors are notifications of unusual situations or potential problems. If the warning deals with user input, the user should correct the input problem because the warning sometimes precipitates the use of defaults that may not have been intended.

[0049] The third category is notation advisors. There are many data that may be of interest during pack building. Notations report on these items. They are not errors or warnings but simply notifications of items of interest as pack building proceeds or after it has finished.

[0050] All advisors in this implementation have arrays that keep track of how many times each has been called: NumErrors(i), NumWarnings(i), and NumNotes(i), for the i-th error, warning, or notation, respectively. The totals for each category of advisor are also accumulated in the parameters NTotErrors, NTotWarnings, NtotNotes.

[0051] The display of advisors in this preferred implementation is controlled by arrays containing integers limiting the number of times an advisor is to be displayed to the computer screen and written to a disk file created for that purpose. The integer arrays LimScErrors(i) and LimDiErrors(i) dictate how many times the i-th error is to be written to the screen and the disk file, respectively. Similarly, LimScWarnings(i) and LimDiWarnings(i) are provided for warnings and LimScNotes(i) and LimDiNotes(i) for notations. If any of these array elements is less than or equal to zero, the corresponding advisor is not written. If the user wants all advisors written every time they are encountered, the limit arrays need simply be set to a very large integer (in this implementation not to exceed 2147483646, which is one less than the maximum integer size). The total number of times any advisor has been encountered is monitored in NTotErrors, NTotWarnings, and NTotNotes whether or not it is displayed.

[0052] All data on all advisors according to this preferred implementation are kept in and monitored by the subroutine ErrWarnNote(ierr, iwarn, note, iunitnumber), where ierr is the integer specifying the error, and similarly for iwarn and inote. The integer iunitnumber is the disk file unit number to which advisors are written as requested. It is assigned the number 13 in this implementation.

[0053] The Subroutine INNAME

[0054] In the presently preferred implementation, the data required by the code are read from several data files. The INNAME subroutine reads the names of the data files in which the data resides from a file called INNAME.INP. The files whose names are specified in INNAME.INP are as follows: FILE DESCRIPTION DEFAULT NAME Histogram Contains data on sizes, quantities, HIST.INP and types of particles along with material information and the sizes of the cylinders into which they are to be dropped. Drop File Contains data on where and how DROPDATA.INP particles are to be dropped onto the pack. Preplace File Containing the positions and types PREPLACE.INP of particles to be preplaced in the pack, if any. Input Control Contains the input flags and para- INFLAG.INP File meters that control how the pack is to be built. Output Control Contains flags and parameters con- SETOUT.INP File trolling what output data is to be generated and how it is to be displayed.

[0055] In accordance with the preferred implementation, if the file INNAME.INP does not exist, then default names are used for each of the five files containing input data. The default names for this implementation are identified in the third column of the table above.

[0056] In the preferred implementation, the histogram file is mandatory but the other files are not. Packs can be built if all other files are missing by using defaults. Of course, the various options and data production capabilities of the presently preferred implementation may not be exerciseable without these other files.

[0057] The Subroutine SETHISTOGRAM

[0058] The SETHISTOGRAM subroutine according to this preferred implementation reads the particle histogram from the histogram file and sets necessary parameters in the program associated with that file. The particle histogram comprises a set of particle modes and submodes, in this implementation in the form of arrays. If there is no size distribution attached to a particular mode, the submode arrays simply contain the mode data as their first and only entry.

[0059] First, subroutine SETHISTOGRAM checks to see if the histogram file exists. If it does not, the program is terminated with a fatal error message. If the file exists, the data is reads as follows.

[0060] The number on the first line of the histogram file is the “stop build” criterion in the form of an integer called STOPBUILD. If STOPBUILD is positive, then that is the total number of particles to be placed in the pack. If STOPBUILD is less than or equal to zero, then pack building is to be stopped when the center of the highest placed particle reaches a certain altitude or when a pre-specified maximum number of particles is placed, whichever comes first. If STOPBUILD is less than or equal to zero, the second line is the real number STOPALTITUDE specifying the altitude at which pack building is to cease.

[0061] The particle histogram is processed next in this implementation. Each set of lines contains the data for one mode. The modes do not have to be in any particular order. The first line of the set contains the mode information. If there is a size distribution associated with this mode, a set of lines follows that specifies the submodes. In this implementation there are six numbers on each mode line.

[0062] 1. The first number is the mean particle size for the mode. It is read in as a particle diameter but is internally converted to particle radius.

[0063] 2. The second number is the mass quantity for the mode. Because the total mass quantities are normalized later, relative mass quantities are adequate.

[0064] 3. The third number is the mass density for the mode. The units of particle size and density preferably are consistent. In this implementation this is a requirement. For example, one should not input a mode diameter in microns and its density in grams/cm³.

[0065] 4. The fourth number is an integer specifying a material number for the mode. Material numbers are a way of specifying some property unique to a mode or set of modes. For example, a material number may specify a particular material composition or it may specify a set of modes that have some other feature in common.

[0066] 5. The fifth number is the radius of the cylinder into which the particles of this mode will be dropped. The centers of the particles are constrained to stay within this cylinder wall. If there is a distribution associated with this mode, the cylinder radius of the mode is ignored and the cylinder radii for each submode are used.

[0067] 6. The last number is a logical parameter RDIST specifying whether there is a distribution of submodes associated with this mode. If the parameter is FALSE, there is no distribution and the first submode array elements are filled with information for that mode. If the parameter is TRUE, the program next reads the submode information in the following form.

[0068] The submode data for this implementation comprises a set of lines, each one of which includes the following three pieces of information:

[0069] 1. The submode size. As with the mode sizes, it is read in as a diameter but internally converted to a radius.

[0070] 2. The fractional mass of the submode. This number is the fraction of the mode's mass contained within this submode. The sum of a mode's fractional masses should add to unity. The program normalizes them if they do not.

[0071] 3. The submode cylinder radius.

[0072] In many parts of the code as presently preferred and implemented, it is convenient to have the submodes ordered in increasing particle size. A global size array is created that contains all submodes in increasing particle size. The global submode arrays comprise an array of submode radii (QSIZE), submode mass (QMASS), submode mass density (DENSITY), submode material number (MODEMAT), and submode cylinder radii (SUBCYLRAD).

[0073] The end of a submode is signaled by a set of zeroes everywhere that a nonzero number was expected, and the end of a mode is likewise signaled when a set of zeroes is read.

[0074] After reading all mode and submode information, the SETHISTOGRAM subroutine reads the information in the drop file if it exists. If it does not exist, the program drops the particles randomly anywhere within the cylinder corresponding to that mode or submode. If it does exist, then it contains the following data.

[0075] The first line has two integers. The first integer is a drop option, either 1, 2, or 3. The second integer is the number of particles that are to be dropped according to that option.

[0076] Option 1 means that first group of particles are to be dropped randomly anywhere within their cylinder.

[0077] Option 2 means that the particle group is to be dropped within a circle of relative radius α_(r) where the drop radius is some fraction of the cylinder radius (0≦α_(r)≦1) of the particle that will be selected. The center of this circular region is at relative radial position p_(r) where p_(r) is some fraction of the particle's cylinder radius when it is chosen (0≦p_(r)≦1). Because dropping particles outside the cylinder wall is forbidden, it should hold that p_(r)+α_(r)≦1. These data are stored in the pack position arrays.

[0078] Option 3 means that each particle in that group is to be dropped from a specified position and is of a specified mode. The x position of the drop site is stored in the x position array, the y position in the y position array, and the mode number in the mode number pack array. If an (x,y) position lies outside the cylinder corresponding to that mode, a warning message is issued and the particle is randomly dropped anywhere within the cylinder.

[0079] The end of this input file is signaled by a value of zero for the drop option.

[0080] Another function of the SETHISTOGRAM subroutine in this implementation is to create an index array that orders the global cylinder radii in ascending order with an integer array called CylSizeOrder so that cylrad(CylSizeOrder(1)) is the smallest cylinder radius, cylrad(CylSizeOrder(2)) is the second smallest, and so forth.

[0081] The Subroutine SETCONTROL

[0082] The currently preferred implementation includes a variety of options for pack construction. Some of those options are read in a file that can have any name as specified in Subroutine INNAME but whose default value is INFLAG.INP. This subroutine SETCONTROL reads those control parameters.

[0083] If a data file containing input control parameters exists, then the control parameters are read from it in this implementation. If it does not exist, a default is set for each parameter in this routine. The parameters used in this implementation are described in detail below but in summary include the following:

[0084] ROUGHNET=A flag that specifies whether the k-th mode catch net (described below) is ratcheted up after each particle placement so that no two particles are at exactly the same altitude. It is mostly used at the beginning of pack building so the spheres at the bottom of the pack do not lie exactly on the bottom of the cylinder. The default is TRUE.

[0085] POOL=A flag that specifies whether the number of particles in the pack are selected by a random number generator, weighted by their frequency of occurrence in an infinite pack, or whether they are selected from a pool whose mode proportions are, to the nearest integer, exactly the proportions of an infinite pack. If the POOL flag is TRUE, then random chance variations in modes that contribute few particles to the pack are avoided. The default is TRUE.

[0086] FINDLOW=A flag that orders find the lowest exposed north pole of placed particles within its drop cylinder and to drop immediately in its neighborhood. It is overridden by any instructions that may appear in the drop file. The default is TRUE.

[0087] NDROP=A positive integer that specifies the number of times a trial drop of each particle is to be made. The lowest final resting place is selected from among the trial drops. Higher values for NDROP means the pack will be more dense. The default is one.

[0088] ISEED=An integer specifying the random number seed. A non-positive integer will trigger to seed the random number generator from the system clock.

[0089] TUNNEL=A flag that gives permission to check for cavities underneath larger spheres when a smaller sphere is dropped. The small sphere “tunnels” through the large one and, if there are no overlaps in the southern or underneath side, is dropped again from that underneath position whereupon it searches for a final resting place in that cavity. The tunneling procedure seeks to mimic tamping or shaking a pack to fill in such cavities, thereby making the pack more dense.

[0090] The Subroutine SETOUTPUT

[0091] A particle pack is typically created so that the system or method user can obtain specific information about the actual particle pack the simulation is intended to simulate. The information required depends on the application. The subroutine SETOUTPUT in this implementation reads the flags and parameters that instruct other parts of the preferred implementation to create specific pack information. In this implementation, for example, if the instruction file for setting output flags and parameters does not exist, the code outputs a limited amount of information into a file called PACKDATA.OUT. Otherwise, this basic pack information is output to a file name specified in Subroutine INNAME. With no specifications, the following data is sent to the output file:

[0092] an echo of the particle histogram;

[0093] the packing fraction;

[0094] the maximum and minimum positions of particles for each submode as well as overall maxima and minima; and

[0095] the number of particles placed for each submode as well as total particles placed.

[0096] If the pack output file exists when using the preferred implementation, it preferably contains the following information. The first line contains a flag specifying whether the particle pack is to be written to a disk file. The default is FALSE. If the flag is TRUE, then the next set of lines specify how the pack file is to be written. On the first subsequent line, the format of the pack (ASCII or binary) is written. On the second subsequent line, a flag is read that determines whether the material number and radius are written in the pack file in addition to the three coordinates and the mode number. On the third subsequent line, the output geometry (Cartesian or cylindrical coordinates) is written. The name of the file to which the pack is to be written is on the fourth line.

[0097] The next line contains a flag specifying whether radial distribution functions g_(ij)(r) are to be generated. If it is TRUE, then the functions that are to be generated are specified in a list of integer pairs i and j on the subsequent lines, where the i and j represent modes or submodes. Each line also contains a Δr which is the increment in terms of the j-th particle radius in which the number of particle centers are to be counted (default=0.1 radius) and r_(max) which is the extent to which the radial distribution function extends in terms of j-th particle radius. Hence each radial distribution function requested is on a line with the format i j Δr r_(max). The list ends when zeroes are read. Each radial distribution function is written to a file with the name g[i]_[j].dat where the square brackets indicate the actual specified integers to be used in the file name, e.g., g3_(—)14.dat for the radial distribution function of Mode 14 spheres about Mode 3 spheres. The default for the radial distribution flag in this implementation is FALSE.

[0098] The next line in this implementation contains a flag specifying whether coordination numbers are to be generated. If it is TRUE, then the coordination numbers that are to be generated are read as a list of integer pairs i and j on subsequent lines. The list ends when zeroes are read. The coordination numbers preferably are all written to one disk file COORNUM.DAT. The default for the coordination number flag in this implementation is FALSE.

[0099] Radial distribution functions and coordination numbers and their calculation procedures are defined in the discussion of subroutine OUTSTAT, below.

[0100] In accordance with the apparatus aspect of the invention, the apparatus comprises means for defining a space, a plurality of subspaces within the space, and a central string within the space and within the subspace. In accordance with the method aspect of the invention, the method comprises defining a space, defining a plurality of subspaces within the space, and defining a central string within the space and within the subspaces.

[0101] The subspaces preferably comprise N concentric cylinders disposed about the central string and within the space. Each of the N cylinders corresponds to one of the N particle modes and has a cylinder radius corresponding to the particle radius of the particles of the corresponding particle mode. The means as implemented in the preferred embodiment comprises the processor.

[0102] The space and subspaces are constructions that define the regions or volumes into which the respective particles are to be placed. The space may comprise any contained geometric region, but preferably comprises a cylindrical construction. The subspaces also may comprise any contained geometric region, but preferably have a shape and configuration that corresponds to the overall space. In the preferred versions of the apparatus and method, the space comprises a cylindrical volume, and the subspaces comprise a plurality of concentric cylinders, disposed about a longitudinal or z axis, wherein sequential ones of the cylinders have a radius that is larger than the prior cylinders. An illustrative example of such a concentric cylinder configuration is shown in FIG. 2. The number of cylinders in the preferred implementation is equal to the number of particle categories, e.g., submodes, that will be present in the particle pack. The radius of each cylinder is selected to correspond to the radii of the particles. The radius of the first cylinder corresponds to or is a function of the particle radius of the smallest mode, the radius of the second cylinder is equal to the particle radius of the second smallest mode, and so on. The cylinder radius for a particular particle category preferably corresponds to or is a function of the radius or a representative radius of the corresponding particle for that mode or submode. The cylinder radius may be any positive number multiple of the particle radius. Preferably but optionally the cylinder radius is about 3 to 10 times the particle radius, and move preferably about 5 to 10 times the particle radius.

[0103] The Subroutine PPACK

[0104] Further in accordance with the method aspect of the invention, the method includes selecting a particle from the plurality of particles, and placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles.

[0105] In accordance with the preferred implementation, particles are selected randomly from the distribution of particles using a Monte Carlo method, although this is not necessarily limiting. In terms of the apparatus, this comprises a random number generator in computer 100.

[0106] Regarding terminology, a “selected particle,” also referred to herein as a “current particle,” is a particle that has been selected for placement, but has not yet been placed (become a placed particle”) in a particle location in the particle pack. A “placed particle” is a particle that has been placed or fixed by assigning it a unique particle location in the particle pack.

[0107] In the preferred implementation, the software code subroutine selects particles and constructs the particle pack according to instructions read by the previous subroutines. Each time it is called to build a new pack, it initializes all variables and arrays so there will be no interfering data left over from a previous call. Code lines of PPACK and a brief explanation of each will now be provided.

[0108] Call PREPAREPACK

[0109] Subroutine PREPAREPACK performs three functions in this implementation. First, it preplaces particles, if any, that have a position assigned by the user, such as would be desirable if semi-random packs were to be built. Secondly, it arranges histogram data such that particles can be chosen by the random number generator with probabilities appropriate for their abundance in the reduced dimension pack. Third, it initializes and sets parameters that will be used by the rest of the subroutines in PPACK.

[0110] DO icarus=1, stopbuild

[0111] This DO loop continues to cycle until either the user-specified number of particles have been placed in the pack or until a pack height has been reached.

[0112] Call CHOOSE

[0113] Subroutine CHOOSE chooses the type, category, mode or submode of the next particle to be dropped. It drops the “current particle” according to user-specified instructions.

[0114] DO idrop=1, ndrop

[0115] The user may specify more than one drop at different drop sites for each particle so that the lowest final site can be selected. Multiple drops are equivalent to tamping the pack so the particles settle into lower sites resulting in a denser pack.

[0116] Call DROPSITE

[0117] Subroutine DROPSITE selects an (X, Y) position from which the particle will be dropped. The site can be chosen randomly, or the user may ask the code to use a criterion to find potential sites where the particle is likely to settle to an especially low final resting place.

[0118] Call PLACE

[0119] Subroutine PLACE finds the final resting place or “placed particle location” for the current particle, which is the site at which the current particle will ultimately be placed. The subroutine PLACE in this implementation contains all the instructions on how a particle drops, rolls, and encounters other objects in the pack as it moves toward its final resting place. It is where the machine spends the great majority of its processing time during pack construction.

[0120] END DO

[0121] Call UPDATE

[0122] Subroutine UPDATE updates all the particle pack arrays and parameters with the position and additional data associated with the newly placed particle.

[0123] END DO

[0124] RETURN

[0125] END

[0126] In accordance with the preferred implementation, a particle pack is constructed by “dropping” the selected particles one at a time into the set of concentric cylinders. The dropping presumes a vertical orientation, which is not necessarily required. But regardless of the reference frame, the current particle is moved in the space until it encounters another object, as described in principle herein. Each particle mode is dropped somewhere within the cylinder radius of its corresponding cylinder. The radius of the cylinders in this preferred implementation is specified by the user, but preferably the small particles are dropped into a small-radius cylinder and the larger particles into a larger-radius cylinder or subspace. The large particles can therefore overlap the inner small-radius cylinders but the small particles do not have to fill the volume in the larger cylinders. The reduced dimension approach as described in Davis and Carter is used in this preferred implementation.

[0127] The reduced dimensional approach can make pack building tractable from a processing demand perspective when the particles comprising the pack have broad size ranges. Particle centers in this implementation cannot pass outside the radius of the cylinder wall to which they belong but can pass through any smaller cylinder walls. Because only the innermost cylinder can have all modes or submodes intersecting it, only there does the reduced dimension pack literally approximate the corresponding real three-dimensional pack. The remainder of the pack can however be simulated using this approach, for example, by assuming that the remainder of the space is statistically identically configured.

[0128] In the presently preferred implementation, the selection of particles to be placed and the placement of the particles in the particle pack are undertaken by the processor within the machine under the execution of the PPACK subroutine. In this implementation, there are four subroutines called by PPACK (PREPAREPACK, CHOOSE, PLACE, and UPDATE). Each of these subroutines and the functions they perform will now be described.

[0129] The Subroutine PREPAREPACK

[0130] As noted above, the PREPAREPACK subroutine has three functions: preplacing particles, setting cumulative arrays so the random number generator can readily choose the mode of the next particle to be placed, and initializing various parameters in preparation for building the pack. Each of these functions will now be described in turn.

[0131] Pre-Placing Particles

[0132] The first function of PREPAREPACK is to pre-place any particles for which the user has specified a position. This option permits semi-random or fully ordered packs to be constructed. A filename is read in Subroutine INNAME that contains the global (X, Y, Z) position and the mode or submode number of each particle to be pre-placed. If the filename is not read, the default filename for preplaced particles is PREPLACE.INP. If a filename of preplaced particles does not exist, the program assumes no particles are to be preplaced and this option is not exercised. The preplace file contains five numbers for each particle to be placed. In order, they are the X position, the Y position, the Z position, and the mode number, and the submode number. These are read into the surface arrays.

[0133] Setting Arrays for Choosing Particles

[0134] The second function of PREPAREPACK according to the preferred implementation is to make an array so that the random number generator can randomly choose, with the appropriate probability, the submode of the next particle to be placed in or on the pack. The relative fraction of particle numbers for each submode therefore should be calculated. The number of particles in each submode to be placed will depend on the submode mass, its mass density, its particle radius, and its cylinder radius, e.g., in the following manner.

[0135] In this implementation there are two options in setting up the weighting factors that govern how the random number generator will choose the next particle to be placed. The first option is to use the same weighting factors each time a particle is chosen for placement. This is referred to herein as the “unchanged-weighting option.” The second option, referred to herein as a “pool option,” creates a pool that has a set of bins with the appropriate number of particles placed into it. Each time a particle is drawn from one of the bins, the weighting factor of drawing from each bin is altered slightly. Creating a pool of particles from which to draw forces the right proportion (to within nearest integers) of particles from each submode to be placed. In the limit of an infinite number of particles in the pack, these two methods are identical. The pool option more closely resembles a very large pack. The unchanged-weighting option will be described first.

[0136] Unchanged-Weighting Pool Option

[0137] The total volume of k-th submode particles to be placed is $\begin{matrix} \frac{m_{k}}{\rho_{k}\frac{4}{3}\pi \quad a_{k}^{3}} & (1) \end{matrix}$

[0138] where m_(k) is the submode mass, ρ_(k) is the submode mass density, and a_(k) is the particle radius for that submode.

[0139] The relative number of submode k particles in this reduced dimension pack is also proportional to the area of the confining cylinder for that submode: πR_(k) ² where R_(k) is the radius of the cylinder. Therefore, the fraction f_(k) of k-th submode spheres to be placed in a reduced dimension pack is proportional to $\begin{matrix} {\varphi_{k} \equiv {\frac{m_{k}R_{k}^{2}}{\rho_{k}a_{k}^{3}}.}} & (2) \end{matrix}$

[0140] To obtain the actual fraction f_(k), the above expression can be normalized: $\begin{matrix} {F = {\sum\limits_{k = 1}^{N}\varphi_{k}}} & (3) \end{matrix}$

[0141] where N is the total number of particle submodes. Then

f _(k)=φ_(k) /F.  (4)

[0142] These are the unchanged-weighting factors that determine which particle submode shall be chosen for the next placement.

[0143] These weighting factors are placed into a cumulative array so the random number generator can immediately choose the submode. In other words, the cumulative array is the sum of all weighting factors prior to it: $\begin{matrix} \begin{matrix} {C_{1} = \quad f_{1}} \\ {{C_{i} = \quad {\sum\limits_{k = 1}^{i}f_{i}}},{1 < i < N}} \\ {C_{N} = \quad 1.} \end{matrix} & (5) \end{matrix}$

[0144] When a uniform random number r is generated on [0,1], a bisection search is made of the array {C₁, C₂, . . . C_(N)} to find which pair of numbers the random number lies between. The k-th submode is chosen if C_(k−1)<r≦C_(k). C₀ is defined to be zero.

[0145] Pool Option

[0146] The pool option is similar. As discussed before, the user can specify the number of particles to be placed in the pack or can specify a pack height in which case the program continues to add particles until the height is achieved (or until the array sizes are exhausted). The pool option in this implementation can only be used if the user has specified the total number of particles to be placed in the pack, say n. The number of submode k particles n_(k) to be placed is

n _(k) =NINT[nf _(k)]  (6)

[0147] where NINT indicates the integer nearest to its argument. Because of nearest integer roundoff, it is possible that the n_(k) do not sum exactly to n. Then the n_(k) quantities should be adjusted to compensate where the roundoff errors were the largest.

[0148] It is possible, especially for packs with very broad particle size distributions, that some nf_(k)<½ so that submode would not be represented at all in the pack. The preferred implementation issues a warning when that happens, or even when a particular n_(k) is very small, so that the user is aware that the pack is too small to be able to sample enough different configurations to mimic a true three-dimensional particle pack. Changing cylinder sizes on some submodes can solve this situation, should it arise.

[0149] Initializing Various Parameters

[0150] The packing routine can be called many times, as when the user wishes to search for an optimum pack subject to some set of constraints. Some of the parameters and arrays from previous calls must not be carried into successive calls or they can taint the results. This portion of Subroutine PREPAREPACK initializes all necessary parameters, flags, and arrays for use in a new pack simulation.

[0151] The Subroutine CHOOSE

[0152] The CHOOSE subroutine uses the random number generator to choose the submode of the next particle to be added to the pack. The random number generator in this implementation generates a uniform distribution on [0,1]. The cumulative array from the previous routine PREPAREPACK is a set of numbers such that

C ₀=0<C ₁ <C ₂ <. . . C _(N−1) <C _(N)=1.  (7)

[0153] Because this cumulative array can be large, and because there is no restriction on the relative distances between successive array elements, in this implementation, a search by bisection is a preferred method to find two numbers between which a given random number lies.

[0154] When a random number r is chosen in [0,1], we want to find the two array elements that bracket it such that

C _(k−1) <r≦C _(k), 1≦k≦N.  (8)

[0155] (In the unlikely event that r=0, it will be assumed to belong to the first bin, i.e., where k=1.) In preferred bisection methods, a check is made to determine on which side of C_(N/2) the random number lies. Then attention is concentrated on that side and it is bisected again, continually narrowing the range of {C_(k)} in which r lies until Eq. (8) is satisfied.

[0156] As noted above, the particle just chosen is referred to herein as the “current particle” or the “selected particle” in the discussion below.

[0157] The Subroutine DROPSITE

[0158] The DROPSITE subroutine chooses a drop site from which the current particle can be dropped. Actually, if the user so specifies, it chooses several drop sites and then keeps the site at which the particle came to the lowest possible final resting place, referred to herein as a “placed particle location.” In a sense, this is the same as tamping the pack so that it settles into a denser configuration. The user specifies how many trial drops a particle is to undergo. The default in this implementation is one.

[0159] There are several options available to the user in this implementation when deciding where a new selected particle is to be dropped onto the pack.

[0160] 1. Drop it randomly anywhere within its cylinder;

[0161] 2. Drop it randomly anywhere within a user-specified circle that is contained within the cylinder;

[0162] 3. Drop it from a user-specified (X,Y) position; and

[0163] 4. Select the lowest exposed north pole among the placed pack spheres and drop it randomly within a short distance of that pack sphere's (X,Y position. If dropping multiple times, it is preferable to select the several lowest exposed north poles and drop within a short distance of each of them.

[0164] Dropping Randomly within the Cylinder

[0165] When dropping a sphere anywhere within a given cylinder, two random numbers are generated, u_(φ) and u_(ρ). The azimuthal angle (in radians) of the drop position ψ_(c) relative to the central string is chosen by

φ_(c)=2πu _(φ).  (9)

[0166] The radial position is not chosen uniformly because there is more area for large radial positions in a circle than for small radial position. Because the area grows as the square of the radial size, all areas will be equally accessible if we take the square root of the random number generator and multiply it by the cylinder wall radius for the current sphere W_(c):

ρ_(c) =W _(c) {square root}{square root over (u_(ρ))}.  (10)

[0167] The (X, Y) drop site is found as follows:

X _(c)=ρ_(c) cos φ_(c)  (11a)

Y _(c)=ρ_(c) sin φ_(c).  (11b)

[0168] Dropping Randomly within a User-Specified Circle

[0169] Suppose the user specifies that the particles are to be dropped randomly within a circle of radius R centered at (X₀, Y₀). In the preferred implementation it is required that the circle be contained within the cylinder of the current sphere, i.e.,

{square root}{square root over (X₀ ²+Y₀ ²)}+ R≦W _(c).  (12)

[0170] Otherwise, the circle is an illegal specification because a particle cannot be dropped outside its cylinder wall. In that case, the preferred implementation will default to dropping randomly anywhere within the cylinder wall at W_(c). A value of zero for R is permitted, meaning the particles are dropped from the position (X₀, Y₀). If this condition is satisfied, then the drop site can be selected as follows. Two random numbers are generated, u_(φ) and u_(ρ). Then

φ_(c)=2πu _(φ)  (13)

ρ_(c) =R{square root}{square root over (u_(ρ))}  (14)

X _(c) =X ₀+ρ_(c) cos φ_(c)  (15a)

[0171] and

Y _(c) =Y ₀+ρ_(c) sin φ_(c).  (15b)

[0172] Dropping from a User-Specified Xy Position

[0173] The condition of dropping a selected particle from a user-specified X-Y position is a subset of the previous discussion for the special case of R=0. The positions are stored in the pack surface arrays for that particle until it is placed, at which time the drop XY position is replaced by the XY position of the final resting location, or the placed particle location, for that particle.

[0174] Dropping Above Lowest Sites

[0175] In the preferred implementation, a running list is kept of all placed pack spheres whose north poles have not yet been covered by other pack spheres. These north poles are ordered according to their altitude (north pole altitude, not sphere center altitude). It is generally desirable for the current or selected sphere to find a final resting place with the lowest altitude. The lowest exposed north pole is a more likely candidate for a low final placed particle location. Therefore, if the current sphere is to be dropped m times (m≧1), then we choose the lowest m exposed north poles and drop randomly within a circle of radius MIN(a_(c), a_(i)) of that north pole's XY position, as long as it is within the current sphere's corresponding cylinder wall. The quantity a_(c) is the radius of the current sphere and a_(i) is the radius of the placed sphere above whose exposed north pole the current sphere is being dropped. Dropping randomly within this circle is done in the same manner as is described above. North poles outside W_(c) are ineligible for dropping in this implementation. If there are less than m exposed north poles, the other sites are chosen randomly within the cylinder.

[0176] The Subroutine PLACE

[0177] The subroutine PLACE in this implementation takes the current particle from its initial drop site to the final resting place or placed particle location associated with that drop site. The dropping and rolling preferably is done without any dynamics. The particles in this implementation do not bounce, nor do they gain speed or shoot off the edge of another particles with a parabolic trajectory. It is as if the particles are being dropped in a highly viscous fluid so that all inertia is absent and the particle creeps to its final resting place.

[0178] There are four subroutines in the presently preferred implementation of the PLACE subroutine. They are referred to herein as FOBJ1, FOBJ2, FOBJ3 and STABLE. FOBJ1 finds the first object the descending current sphere encounters. FOBJ2 finds the second. FOBJ3 finds the third. STABLE determines which contacted objects the current sphere will stay in contact with and which it will roll away from. The term “object” is used instead of “sphere” because one of the objects of contact may be the cylinder base or wall.

[0179] A number of terms will now be defined for purposes of this discussion before describing the operation of the PLACE subroutine. The “roll corridor” is the path of descent of a sphere as it descends along its contacts with one or more spheres and/or the cylinder wall. A good share of the effort of subroutine PLACE is to find the objects that overlap the roll corridor. An “object” according to this implementation can be one of four things that the current sphere can encounter as it descends: (1) other pack spheres (placed particles), (2) the cylinder base or wall, (3) a “water level,” or (4) a “catch net.” The latter two are described more fully below. “Contact stability” refers to whether the current sphere is in compressive contact with an object or in tensile contact. If it is in compressive contact with another sphere or the cylinder wall, they are pushing against each other due to the weight of the current sphere when gravity is acting along the −z axis. The current sphere at this position stays in contact with an object it compressively touches. Usually if it touches three or more objects compressively, it is stable and is placed at that position. If there is a tensile contact, the object and current sphere are pulling away from each other. Therefore, the current sphere will roll away from the object unless it already has three or more compressive contacts. The first pack sphere touched by the current sphere is denoted as Sphere 1, the second as Sphere 2, and so forth. If a set or plurality of spheres are touched simultaneously, the numerical order can be arbitrarily selected.

[0180] The flowchart presented in FIG. ______ shows how Subroutine PLACE operates. Subroutine FOBJ1 searches for the first object of contact. If the current sphere simultaneously contacts more than one object, it checks them for stability through subroutine STABLE. Subroutine FOBJ2 searches for the second object of contact. If the current sphere simultaneously contacts two or more objects, it checks them for stability. Likewise, subroutine FOBJ3 searches for the third object of contact. Again, if the current sphere simultaneously contacts three or more objects, it checks them for stability. The current sphere is placed if it is stably touching three or more objects or has hit the catch net or a water level.

[0181] We will now give an overview of each subroutine and how they interact, followed by a detailed discussion of each one.

[0182] Overview of Subroutine STABLE

[0183] Subroutine STABLE determines whether the current sphere is in compressive or tensile contact with all objects it is currently touching. It marks those objects in tensile contact so that the current sphere will roll away from them as it continues to descend.

[0184] Overview of Subroutine FOBJ1

[0185] The first subroutine for determining object contact is called FOBJ1 for “Find Object 1,” object 1 being which is the first object the descending current sphere will encounter. There are four possible outcomes of FOBJ1;

[0186] 1. The current sphere encounters the catch net or a water level before encountering any other sphere. If it does, then it is placed at the position where such contact occurs.

[0187] 2. The current sphere encounters a placed sphere of the pack. If it does, the index number of that sphere (hereafter denoted as Sphere 1) is recorded and FOBJ2 is called.

[0188] 3. The current sphere simultaneously hits two placed spheres of the pack. If it compressively touches both of them, it will roll along the roll corridor defined by them and FOBJ3 is called to determine whether a third object is hit before it loses contact with one or both of the touched placed spheres.

[0189] 4. The current sphere simultaneously hits three or more placed spheres of the pack. STABLE checks to see if any three of them provide a stable placement. If they do, the current sphere is placed there. If they do not, STABLE marks the objects from which the current sphere will roll away.

[0190] Overview of Subroutine FOBJ2

[0191] FOBJ2 searches for the second object to be encountered by the current sphere as it descends along the path of steepest descent on Sphere 1. There are four possible outcomes of FOBJ2:

[0192] 1. The current sphere hits the catch net or a water level before encountering any other object. If it does, it is placed there.

[0193] 2. The current sphere loses contact with Sphere 1 by reaching its equator before encountering any other object. If it does, it is free falling again and FOBJ1 is called, and re-initialized.

[0194] 3. The current sphere hits a second object, either another placed sphere or its cylinder wall. STABLE is then called to see if it is in compressive contact with both objects. If it is, FOBJ3 is called. If it loses contact with one object, FOBJ2 is re-called and re-initialized. If it loses contact with both objects, it is in free fall again and FOBJ1 is re-called and re-initialized.

[0195] 4. The current sphere hits two or more additional objects simultaneously. STABLE is called to check for compressive contacts. If there are three or more compressive contacts, the particle is placed where it is. If there are two, FOBJ3 is re-called; if there is one, FOBJ2 is re-called; and if there are none, the current sphere is in free fall and FOBJ1 is re-called.

[0196] Overview of Subroutine FOBJ3

[0197] FOBJ3 searches for the third object the current sphere encounters as it descends along the roll corridor formed by the first two objects. There are four possible outcomes of FOBJ3.

[0198] 1. The current sphere hits the catch net or a water level before encountering any other object. If it does, it is placed there.

[0199] 2. The current sphere loses contact with one of its two contacts before encountering any other object. If it does, FOBJ2 is re-called.

[0200] 3. The current sphere loses contact with both objects simultaneously before encountering any other object. If it does, it is in free fall and FOBJ1 is re-called.

[0201] 4. The current sphere encounters one or more additional objects. If it does, STABLE is called to check whether three or more are in compressive contact. If they are, the current sphere is placed there. If not, contacts are lost with those objects in tensile contact. If two objects remain in tensile contact, FOBJ3 is re-called; if one object, then FOBJ2 is re-called; and if all contact is lost, the current sphere is in free fall and FOBJ1 is re-called again.

[0202] Detail of Subroutine STABLE

[0203] The structure and manner of operation of the STABLE subroutine according to the preferred implementation will now be addressed in greater detail. Consider the current sphere with weight W acting in the −z direction. If it is touching one or more objects, is it compressively touching them or would it roll away from them.

[0204] Index numbers of placed pack spheres being touched are passed to subroutine STABLE in an array called INDEXTOUCH. A separate parameter called TOUCHWALL states whether the cylinder wall of the current sphere's submode is being touched. The manner in which the preferred implementation determines the compressive touching criteria when the current sphere touches (a) one sphere, (b) two spheres, (c) three spheres, (d) one sphere and the wall, or (e) two spheres and the wall will now be addressed. There is generally no need to consider compressive touching for more than three objects because the case for more than three objects can be broken into sets of three. At least three objects should be checked, however, because that is the minimum number needed for stable placement in the presently preferred implementation.

[0205] Compressive Touching of One Sphere

[0206] Determining compressive touching on one and only one pack sphere can be done as follows. If the current sphere is touching its northern hemisphere, it is compressive. Because current spheres are dropped from above, they cannot initially touch southern hemispheres and FOBJ1 rejects a sphere as a touching object if the current sphere only touches its equator.

[0207] Compressive Touching of Two Spheres

[0208] Consider a current sphere that has descended along a longitude line of Sphere 1 until it reaches Sphere 2. When it touches Sphere 2, there are only two possibilities. Either it will roll along a roll corridor formed by compressively touching both Spheres 1 and 2 or it will over-roll Sphere 2 and lose contact with Sphere 1. To check for compressive contact with both Spheres 1 and 2, the preferred implementation checks whether the current sphere would contact Sphere 1 if it were to roll down the longitude line of Sphere 2 where the current sphere has just contacted Sphere 2. If the current sphere would contract Sphere 1, then it must be in compressive contact with Sphere 1. It is certainly in compressive contact with Sphere 2 because of the contact with it. Therefore, it is in compressive contact with both spheres. If, on the other hand, the current sphere would roll away from Sphere 1 while rolling down the longitude line of Sphere 2, then it will leave Sphere 1 and is only in compressive contact with Sphere 2.

[0209] Consider the positions of the three spheres: (X₁, Y₁, Z₁) for Sphere 1, (X₂, Y₂, Z₂) for Sphere 2, and (X_(c), Y_(c), Z_(c)) for the current sphere. The radii of these three spheres are a₁, a₂, and a_(c), respectively. The Sphere 2 longitudinal line at which the current sphere is touching Sphere 2 is at azimuth

φ_(c2)=tan⁻¹[(Y _(c) −Y ₂)/(X _(c) −X ₂)]  (16)

[0210] and it touches at latitude

θ_(c2)=cos⁻¹[(Z _(c) −Z ₂)/(a _(c) +a ₂)].  (17)

[0211] If θ_(c2)≧π/2, then the current sphere has rolled into the underside or southern hemisphere of Sphere 2. In this case, it will be in compressive contact with the two spheres. If θ_(c2)<π/2, then we must see if it contacts Sphere 1 if it were to roll down the longitude line at φ_(c2).

[0212] Let the distance between the current sphere and Sphere 1 be denoted D_(c1) which is a function of θ_(c2). Its square is given by $\begin{matrix} {D_{c1}^{2} = {{\left( {X_{c} - X_{1}} \right)^{2} + \left( {Y_{c} - Y_{1}} \right)^{2} + \left( {Z_{c} - Z_{1}} \right)^{2}} = {\left\lbrack {{\left( {a_{c} + a_{2}} \right)\sin \quad \theta_{c2}\cos \quad \phi_{c2}} + X_{2} - X_{1}} \right\rbrack^{2} + \left\lbrack {{\left( {a_{c} + a_{2}} \right)\sin \quad \theta_{c2}\sin \quad \phi_{c2}} + Y_{2} - Y_{1}} \right\rbrack^{2} + {\left\lbrack {{\left( {a_{c} + a_{2}} \right)\cos \quad \theta_{c2}} + Z_{2} + Z_{1}} \right\rbrack^{2}.}}}} & (18) \end{matrix}$

[0213] If D_(c1) or its square increase as θ_(c2) increases (i.e., as the current sphere rolls down Sphere 2's longitude line), then it has lost contact with Sphere 1. That is, if its derivative with respect to θ_(c2) is greater than or equal to zero, it is not in compressive contact with Sphere 1. If the derivative is negative, it is in compressive contact with both spheres. The expression below is the derivative to within a positive constant of 2(a_(c)+a₂), so if it is negative, the current sphere compressively touches both Spheres 1 and 2: $\begin{matrix} {{\left\lbrack {{\left( {a_{c} + a_{2}} \right)\sin \quad \theta_{c2}\cos \quad \phi_{c2}} + X_{2} - X_{1}} \right\rbrack \cos \quad \theta_{c2}\cos \quad \phi_{c2}} + {\left\lbrack {{\left( {a_{c} + a_{2}} \right)\sin \quad \theta_{c2}\sin \quad \phi_{c2}} + Y_{2} - Y_{1}} \right\rbrack \cos \quad \theta_{c2}\cos \quad \phi_{c2}} - {\left\lbrack {{\left( {a_{c} + a_{2}} \right)\cos \quad \theta_{c2}} + Z_{2} + Z_{1}} \right\rbrack \sin \quad {\theta_{c2}.}}} & (19) \end{matrix}$

[0214] These two-sphere calculations are done in this implementation by Subroutine ST2S.

[0215] Compressive Touching of Three Spheres

[0216] In the case of compressive touching of three spheres, the current sphere at position (X_(c), Y_(c), Z_(c)) and with radius a_(c) is in contact with three pack spheres at positions (X₁, Y₁, Z₁), (X₂, Y₂, Z₂), and (X₃, Y₃, Z₃) and with radii a₁, a₂, and a₃. Let the current sphere have weight W due to gravity or similar force. Assume it is attached to the three spheres at the point of contact with them. The preferred implementation solves a force equation to determine whether the attachments are compressive or tensile. If an attachment is tensile, the current sphere will roll away from it.

[0217] Let the unit vectors pointing from the current sphere toward Sphere i where i is 1, 2, or 3, be denoted by e_(i). Let the magnitude of the force applied on the current sphere by Sphere i be denoted by f_(i). If f_(i) is positive, the attachment is tensile; if negative, it is compressive. The three equations needed to solve for the three f_(i) are given by the vector equation

f ₁ e ₁ +f ₂ e ₂ +f ₃ e ₃=(0,0,−W).  (20)

[0218] Because in the implementation we are only interested in whether the fs are compressive (f_(i)<0) or tensile (f_(i)>0) and are not interested in their magnitudes, the preferred implementation simply sets W to unity and obtains for the f solutions

f ₁=(e _(3x) e _(2y) −e _(2x) e _(3y))det E

f ₂=(e _(1x) e _(3y) −e _(3x) e _(1y))det E

f ₃=(e _(2x) e _(1y) −e _(1x) e _(2y))det E  (21)

[0219] where det E is the determinant of the 3×3 matrix whose columns are the unit vectors e₁, e₂, and e₃:

det E=e _(1x)(e _(2y) e _(3z) −e _(3y) e _(2z))+e _(2x)(e _(3y) e _(1z) −e _(1y) e _(3z))+e _(3x)(e _(1y) e _(2z) −e _(2y) e _(1z)).  (22)

[0220] If the determinant is zero, the set of equations has no solution because the three placed pack spheres and the current sphere all lie in the same plane. In the unlikely event that this should happen in practice, the preferred implementation first sees if another set of three spheres gives stability if the current sphere is touching more than three placed pack spheres. If there is no stable triplet, then it enacts a subroutine to perturb the current sphere's position slightly in a downward direction such that it will not overlap any of the three spheres. If the perturbation causes contact to be lost with one or two of the touching spheres, it can proceed with FOJB2 or FOJB3. If no contact is lost, then at least the four spheres are no longer coplanar and it can redo the processing without a zero determinant.

[0221] These three-sphere calculations are done in the preferred implementation by Subroutine ST3S.

[0222] Compressive Touching of One Sphere and the Wall

[0223] In the case where there is compressive touching of one sphere and the wall, the wall cannot be the first object contacted because in this implementation, the current sphere drops parallel to it when free falling. Therefore, the only way the current sphere can be in contact with both its cylinder wall and one placed pack sphere is if it hits Sphere 1 and subsequently rolls into the wall. The current sphere is always in compressive contact when rolling on one sphere. Furthermore, because the current sphere must be in contact with Sphere 1's northern hemisphere when it contacts the wall, it must be in compressive contact with the wall because it just rolled into it. Therefore, any time the current sphere is in contact with one sphere and the wall, it is always in compressive contact with both and will descend along a roll corridor defined by both. In the unlikely event that the current sphere hits the cylinder wall and nothing else at the same time it reaches the equator of Sphere 1, it free falls from that point and FOBJ1 is re-called.

[0224] Compressive Touching of Two Spheres and the Wall

[0225] The case of compressive touching of two spheres and the wall is a simple offshoot of the three-sphere case. The cylinder wall will replace one of the spheres as a contact. However, in the absence of friction, the wall can only apply a force to the current sphere directed radially inward.

[0226] Let r₁ and r₂ denote the positions of the two pack spheres and r_(c) denote the position of the current sphere. The relative positions of the two pack spheres to the current sphere is r_(ic)=r_(i)−r_(c), i=1 or 2. These relative vectors point from the current sphere center to the i-th pack sphere center. Let e_(ic) be the unit vector pointing along r_(ic). The force the current sphere applies to each pack sphere and the wall must sum to its weight W. That gives the equation

f ₁ e _(1c) +f ₂ e _(2c) +f _(w) e _(wc)=(0,0,−W).  (23)

[0227] The unit vector e_(wc), which points radially outward from the cylinder center, is given by

e _(wc)=(x _(c) i+r _(c) j)/(x _(c) ² +y _(c) ²)^(½).  (24)

[0228] As before in the three sphere case, the preferred implementation solves for the f_(i), i=1, 2, or w, but actually only their sign is needed: positive, negative or zero. Hence W is set to unity. Let e_(ix) be the x component of the vector e_(ic), i=1, 2, or w, and similarly for the y and z components. Then the solutions for the f_(i) are given by

f ₁=(e _(2y) e _(wx) −e _(2x) e _(wy))/det e

f ₂=(e _(1x) e _(wy) −e _(1y) e _(wx))/det e

f _(w)=(e _(1x) e _(2y) −e _(1y) e _(2x))/det e  (25)

[0229] where

det e=−e _(1x) e _(2z) e _(wy) +e _(1y) e _(2z) e _(wx) +e _(1z)(e _(2x) e _(wy) −e _(2y) e _(wx)).  (26)

[0230] If an f_(i), i=1, 2, or w, is negative, the force between the current sphere and that object is compressive and they stay in contact. If it is positive, the force is tensile and the current sphere will roll away from that object. In the unlikely event that it is zero, the implementation considers it tensile and has the current sphere roll away from the object, thereby trying to find a point of stability at lower altitude. If all three f_(i) are negative, the sphere is in stable contact and is placed at its current position.

[0231] These stability calculations for two spheres and a wall are performed in the preferred implementation by Subroutine ST2S1W.

[0232] Detail of Subroutine FOBJ1

[0233] Returning to the subroutine FOBJ1, it finds the first object the descending current sphere encounters as it is “dropped” from the position selected by subroutine DROPSITE. There are three possible objects the current or selected sphere can encounter: (1) an already-placed pack sphere, (2) a water level, or (3) the catch net. A fourth object that may be encountered later is the cylinder wall, but because the current sphere is assumed to drop parallel to the cylinder wall, it cannot contact the wall until it rolls off some placed pack sphere.

[0234] The Catch Net

[0235] In accordance with the method aspect of the invention, the selected particle placement includes defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles. The selected particle is placed in non-overlapping relation with respect to the catch net. Preferred versions of the method include defining a pack surface for the placed particle, and positioning the catch net relative to the pack surface. The pack surface may comprise a top layer of the placed particles within the space, or preferably, within each of the subspaces. The particle surface optionally may correspond to an average of the south poles or south pole positions of the top layer of placed particles. The catch net may be positioned at a distance from the pack surface based upon a selected particle radius, such as an average particle radius of the top layer or another subset of the placed particles at the pack surface.

[0236] In the way of background, when simulating a particle pack, particularly one with a wide particle size distribution, if the volume fraction of large particles is much larger than that of small particles, the small particles can rattle down through the pack by falling through the interstitial spaces of the large particles. In many particulate materials, there are buoyancy or suspension considerations that would keep the small particles more or less well distributed throughout the pack. Examples of such buoyancy or suspension factors may include the nature or properties of the binder or other inter-particle medium or media, the interaction of the particles with the inter-particle medium or media, interactions among the particles themselves (such as electrical or magnetic interactions), interactions with externals forces or fields that tend to disperse or suspend the particles, and similar phenomena.

[0237] In accordance with this aspect of the present invention, this buoyancy or suspension phenomena is simulated using a “catch net.” The catch net comprises an assumed surface or construct to catch the current or selected particle as it is placed and to prevent that particle from passing a defined location or level which theoretically represents space occupied by smaller ones of the previously placed particles.

[0238] In the presently preferred implementation, a catch net is incorporated into the space, below which the south pole of the falling particles cannot descend. When a particle's south pole hits the catch net belonging to its cylinder, it is placed in the pack at that point, even if it is not touching any other particle. Preferably there is a separate catch net for each particle submode, and thus for each subspace or cylinder. Each catch net preferably covers the entire cross section of that submode's cylinder. If the current sphere's south pole hits that catch net, it is placed there. It does not see or respond to any other submode's catch net. The altitude of the catch net preferably is determined dynamically, that is, it can depend on which placed particles are being contacted.

[0239] The use of a catch net is not necessarily limited to a specific type or size of particle, or a particular size or geometry of the space or subspaces. In accordance with the presently preferred implementation, however, as noted, the particles comprise spheres and the characteristic dimension of each of the particles comprises a radius. The central string comprises a line, preferably the z axis, within the space. The space comprises a cylinder, and the subspaces comprise concentric cylinders disposed about the central string, each of the cylinders defining one of the subspaces and having a radius that corresponds to the radius of the particles in the category corresponding to that cylinder.

[0240] In accordance with the presently preferred implementation, the method further includes defining a pack surface for the placed particles, and the catch net positioning comprises positioning the catch net relative to the pack surface. Also in accordance with this implementation, the catch net positioning comprises positioning the catch net a distance from the pack surface based upon a selected particle radius.

[0241] The placed particles may be assumed to comprise a top layer, and the pack surface optionally but preferably comprises an average of the particle locations of the placed particles in the top layer. In this implementation, the particle surface corresponds to the south poles of the top layer placed particles, and more specifically corresponds to an average of the south pole positions of the top layer placed particles.

[0242] In the presently preferred implementation, the catch net extends across the cross sectional area of the space, across the cross sectional areas of each of the subspaces.

[0243] In this preferred implementation, the catch net comprises N subnets, one of the subnets corresponding to each of the subspaces. Each of the concentric cylinders 1, 2, 3, . . . N has a circular cross section perpendicular to the central string. In the preferred implementation, the catch net comprises a plurality N of subnets, or individual catch nets, one for each of the cylinders. Each of the subnets preferably extends over the cross sectional area of the corresponding subspace or cylinder. The position or level of the catch net or subnet for each of these subspaces can and typically will differ from one another, although in some instances they may be at the same or nearly the same level.

[0244] Preferably, the positioning of the catch net positioning comprises setting the catch net or each of the subnets at a selected distance from the top surface. This selected distance may be a user-defined quantity, or it may be dictated by the material being simulated or other factors. The catch net preferably is positioned at an altitude along the z-axis that is a function of the particle radius of particles corresponding to the mode or submode of the cylinder in which the catch net or subnet resides. The catch net or subnet preferably but optionally is some multiple of the particle radius, preferably one or two ratio, below the top layer or pack surface. Adjustments or offsets, however, may be used.

[0245] When the pack is first being formed so that not enough particles have yet been placed to adequately define a pack surface, the catch net may be defined as the bottom of the cylinder into which the particles are being dropped. In some instances, however, particularly where the specific application involves simulating a very large three-dimensional pack, it is often advantageous or desirable to avoid the edge effects of the flat bottom of the cylinder. Accordingly, in some instances the positioning of the catch net may comprises spacing the catch net from the base surface of the space. The spacing from the base surface, for example, may simulate the positioning of the catch net for a top layer of the placed particles, for example, the positioning of the catch net off of the base of the space may be done in a way that the bottom layer of placed particles simulate the shape, configuration and appearance of the top layer of particles after the particle pack has been constructed to include multiple layers.

[0246] This may be implemented by assigning as initial catch net position for a kth one of the subspaces Z_(init)(k), assigning as the characteristic dimension of the particles of a kth one of the particle categories a_(k), assigning as the characteristic dimension of a small one of the particles a_(min) of the particles, and assigning as the characteristic dimension of a large one of the particles a_(max). Below a threshold level the catch net positioning further comprises positioning the catch net for a kth one of the particle categories at a catch net position Z_(net)(k) within a kth one of the subspaces determined by

Z _(net)(k)=Z _(init) +Hra _(k) a _(min) /a _(max)

[0247] where r represents a weighting coefficient and H represents a switching coefficient. The weighting coefficient preferably but optionally is assigned a random number. Below the threshold value the switching coefficient preferably is assigned a value of one, and above the threshold value the switching coefficient preferably is assigned a value of zero.

[0248] In the presently preferred implementation, the switching coefficient mechanism is implemented by a switch called ROUGHNET which, when true, invokes the random number generator to slightly change the altitude of the catch net so that the first set or layer of placed particles do not all have the same altitude. If ROUGHNET is false, the south poles of the first set of placed particles do have the same altitude because they hit the same catch net.

[0249] Let Z_(init) be the initial altitude above which the pack will be built. It is specified by the user in the preferred implementation but its default preferably is zero. The initial catch net altitude for the k-th mode is

Z _(net)(k)=Z _(init) +Hra _(k) a _(min) /a _(max)  (30)

[0250] where r is a random number in [0,1], a_(min) is the smallest particle radius of all submodes belonging to the pack, a_(max) is the largest, and H is unity if the ROUGHNET switch is true and zero if it is false. This expression for the catch net altitude holds until enough particles have been placed to establish a pack surface, i.e., until m (which is greater than or equal to m_(min)) is reached. No part of any particle is permitted to descend below Z_(init) in this implementation.

[0251] The catch net preferably is positioned relative to the pack surface. The pack surface can be determined in a number of ways. It may be determined, for example, based on the large particles in the top layer, or another subset of the placed particles, e.g., such as the last particles placed.

[0252] The particle surface may be ascertained in the following manner. For each particle category k of the placed particles in the top layer, the program defines a particle radius a_(i) for the placed particles i of that category k. For the cylinder k corresponding to the particle category k, the programs assigns a cylinder radius W_(k). The program also assigns a top layer particle number m(k) and determines values for m(k) by evaluating ${{\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{{m{(k)}} - 1}}a_{i}^{2}} < W_{k}^{2} \leq {\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{m{(k)}}}a_{i}^{2}}},{k = 1},2,\ldots \quad,N$

[0253] where N is the number of particle categories, e.g., the number of submodes. The program then determines the pack surface location using $S = {\frac{1}{m}{\sum\limits_{i = 1}^{m}\left( {Z_{i} - a_{i}} \right)}}$

[0254] where S represents the pack surface and Z_(i) represents the position of a center of a center one of the placed spheres.

[0255] In accordance with the preferred implementation, the surface altitude S of the pack is defined as the average south pole altitude of the last m placed particles where m is a positive integer that will be discussed below. This surface altitude is given by $\begin{matrix} {S = {\frac{1}{m}{\sum\limits_{i = 1}^{m}\left( {Z_{i} - a_{i}} \right)}}} & (27) \end{matrix}$

[0256] where Z_(i) is the altitude of the center of Sphere i which is one of the last m placed particles and a_(i) is its radius. Instead of using a single ith particle radius in Equivalence. 27, one may generalize the expression by permitting (Z_(i)−a_(i)) to be written (Z_(i)−f(a_(i))) where f(a_(i)) is a function of particle radius a_(i). The preferred value for f(a_(i))=a_(i), but f(a_(i)) may assume other forms, for example, such as f(a_(i))=na_(i) where n is a positive real or integer number.

[0257] Although the “surface” of a random particle pack may be a defined in a number of ways, the surface preferably is defined only after the integer m is large enough that the falling spheres have covered the cylinder area. The k-th cylinder with radius W_(k) has area πW_(k) ². Let m be defined as the number of most recently placed spheres whose submodes have cylinder radii less than or equal to W_(k) and whose summed cross-sectional area just exceeds or equals the k-th cylinder area. For the k-th submode, m is taken from the following condition. Let m(k) be the number m for the k-th submode. It is found from $\begin{matrix} {{{\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{{m{(k)}} - 1}}a_{i}^{2}} < W_{k}^{2} \leq {\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{m{(k)}}}a_{i}^{2}}},{k = 1},2,\ldots \quad,N} & (28) \end{matrix}$

[0258] where N is the total number of submodes. The submode k for which this condition is satisfied first, that is, has the lowest m(k) becomes the m for the pack:

m=MIN[m(k)].  (29)

[0259] In the preferred implementation there is a minimum number m_(min) for those unused packs that defeat the reasoning leading to the value for m given in Eqs (28) and (29). In the cases the default value of m_(min) to 12 is assigned in the preferred implementation.

[0260] Once a surface is established, its altitude S is determined by using Eq. (27). As the current sphere descends, if it hits a pack sphere much larger than itself, and if the TUNNEL switch is true, it will tunnel through the large sphere to check for possible cavities under the large particle. Therefore the catch net should be placed quite low so the current sphere can investigate possible cavities. If TUNNEL is false, the catch net does not need to be that low.

[0261] If the current sphere hits a sphere somewhat bigger than itself, then it is unlikely to tunnel because the surface sphere is not large enough to accommodate it in a cavity. Then the catch net need not be as deep.

[0262] Finally, if the current sphere hits a sphere smaller than itself, then it cannot penetrate too deeply into the pack so the catch net can be rather shallow.

[0263] Letting the subscript i denote the first pack sphere contacted, the catch net criteria are quantitatively summarized as follows:

[0264] If a_(i)/a_(c)<1, then the catch net is shallow:

Z _(net)(k)=S−a _(i).  (31a)

[0265] If 1≦a_(i)/a_(c)<a_(x), where a_(x) preferably is {square root}6+2, then the catch net is moderate:

Z _(net)(k)=S−2a _(c).  (31b)

[0266] If a_(i)/a_(c)≧a_(x), where a_(x) preferably is {square root}6+2, then the catch net is deep:

Z _(net)(k)=S−2a _(c) −a _(i).  (31c)

[0267] The value of a_(x) represents the sizes required for a current sphere to fit into a cavity formed by larger spheres, which preferably assumes a value of ({square root}6+2). If the centers of four identical larger spheres form a regular tetrahedron, and a smaller sphere just fits into the interstitial space of the tetrahedron, then the ratio of the smaller sphere to larger sphere diameter is {square root}6+2 in preferred implementation.

[0268] Further in accordance with the preferred implementation, the code monitors the selected or current particle placement to identify the occurrence of the following sequence of events:

[0269] 1. The catch net is set at an altitude when the current sphere hits the i-th pack sphere.

[0270] 2. Then the current sphere rolls off the i-th sphere and loses contact with it.

[0271] 3. When it hits another pack sphere, the catch net is set above the current altitude of the current sphere's south pole.

[0272] If this series of events is detected, the current sphere is raised (its position is adjusted upward) until its south pole is at the new catch net altitude, and it is then placed there.

[0273] The Water Level

[0274] In accordance with another aspect of the invention, the placement of the particles comprises defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface. The current or selected particle then is placed in non-overlapping relation with respect to the water level.

[0275] The water level serves a purpose different than the catch net. Recall that the particle pack according to the preferred implementation is constructed using a series of concentric cylinders, one cylinder defined for each particle category or submode. Recall further that the centers of particles in this implementation cannot pass outside their own corresponding and constraining cylinder into which they are dropped. Large cylinders are used for large particles and small cylinders for small particles, unless the user for some reason designates otherwise. The cylinder construct facilitates or permits use of the reduced dimension approach to particle pack construction. Its purpose is to prevent the program code from having to fill large cylinder volumes with potentially very large numbers of small particles.

[0276] This approach, however, creates the problem that the large cylinders will contain empty space into which large spheres can roll during simulated particle placement where, in a corresponding physical particle pack such as the one being simulated, this would not occur. In the actual pack, the smaller particles would be included even in the regions comprising the larger cylinders, and these smaller particles would be encountered to prevent such rolling.

[0277] The water level simulates this presence in the larger cylinder areas of smaller particles that, according to the presently preferred implementation, have not been placed in the larger cylinders.

[0278] There are a number of methods or approaches for selecting or setting the water level. According to one such approach, the water level positioning comprises determining an average location of the particle locations along the central string of the particles of the portion of placed particles that are smaller than the current or selected particle, and positioning the water level at the average location. The water level may be set at the average altitude of the small particle “surface” as if the outside cylinders were filled with small particles. Then when a large particle or sphere descends onto the water level, the particle, and preferably its south pole, is stopped there as it would be if that volume had been filled with the smaller particles.

[0279] In the presently preferred implementation, wherein the plurality of subspaces (here concentric cylinders) are used, the water level comprises a plurality of subspace water levels, preferably one subspace water level for each subspace or cylinder. These water level positions may and typically will differ from one another as the particle pack is constructed. The water level positioning optionally but preferably comprises assigning a subspace water level position to a portion of the subspace water levels. The portion of the subspace water levels preferably correspond to one water level for each cylinder except the first cylinder. In the preferred implementation, all of the cylinders except the first or central one, containing the smallest particles, has a subspace water level and corresponding subspace water level position.

[0280] In the presently preferred implementations, the water level positioning comprises using an offset to position the water level, or an offset relative to the average location of the particle locations. Preferably, the water level positioning comprises using an offset for each of the subspace water level positions. The water level positioning similarly may comprise using an offset for each of the subspace water level positions.

[0281] In the presently preferred implementation, the water level altitude for the i-th cylinder (i>1) is defined as the average exposed north pole altitude of all particles with radius less than a_(i). The user may raise or lower this level by adding a user-defined offset, but the default for this offset in this implementation is zero. This water level exists between the i-th cylinder wall of radius W_(i) and the next smaller cylinder wall of radius W_(i−1). Thus the spaces between different cylinder walls have different water levels. The cylinder corresponding to the smallest particle's submode has no water level, only a catch net.

[0282] If a larger sphere is descending onto the pack near the center cylinder, it may hit the center cylinder's pack of small particles and tend to roll off its edge and fall to the floor of the pack or fall until it hits another large sphere. Thus the pack would segregate with larger particles outside smaller particles. With the water level in place, however, if the larger sphere rolls off the pack in the central cylinder, it simply “floats” on the water level which is at the same level as the “surface” of the central cylinder pack. Thus, any time a descending sphere hits a water level, it is placed where it is, just as was done with the catch net. Ordinarily, water levels will be higher than catch nets, although this is not always true.

[0283] Search for the First Object Encountered

[0284] A free-falling current sphere can encounter the following situations. It might hit a single pack sphere. If so, FOJB2 is called. It can hit two pack spheres simultaneously. If so, FOBJ3 is called. It can hit three or more pack spheres simultaneously. If so STABLE is called to see if it is in stable contact with any triplet of these spheres. Hitting two or more pack spheres simultaneously is highly improbable in a double precision random code but not so improbable if the pack is semi-ordered, and hence these scenarios are included in the preferred implementation.

[0285] In addition, the south pole of the current sphere may hit the catch net or a water level before it hits any other sphere. In either case, it is placed where it is.

[0286] A pack sphere, e.g., the j-th sphere, is a candidate for being the first object encountered by the descending current sphere if their two radii overlap, i.e., if

(X _(c) −X _(j))²+(Y _(c) −Y _(j))²<(a_(c) +a _(j))²  (32)

[0287] If there were no other obstacles in the way, the current sphere would strike Sphere j at an altitude of

Z _(c)(j)=Z _(j)+[(a_(c) +a _(j))²−(X _(c) −X _(j))²−(Y_(c) −Y _(j))²]^(½).  (33)

[0288] Once the pack has grown to many spheres, efficiency can be greatly enhanced to the extent that as many spheres as possible be excluded from the detailed considerations of the above two equations, while not unduly adversely affecting the accuracy of the simulation in representing the physical particle pack being simulated. For example, if |x_(c)−x_(j)| or |y_(c)−y_(j)| alone were greater than (a_(c)+a_(j)), then there is no need to check the square of their sums as above.

[0289] The processing demands are reduced in the preferred implementation because all spheres whose north poles have submerged beneath the catch net are off limits and need not be included. Simply flagging them by putting a minus sign in front of their mode or submode number indicates that no calculations are to be done to see if they are in range of the descending current sphere. Furthermore, in this implementation the program keeps track of the lowest index number for any sphere whose north pole protrudes above that mode's catch net so that the eventually large list of particles beneath the catch net are not searched at all.

[0290] Submergence of a placed pack sphere beneath the water level, however, is not necessarily grounds for dismissing it from consideration. The current sphere may roll into a cylinder for which the water level is different and the pack sphere may again become a candidate for contact.

[0291] If the current sphere is dropped far enough outside a set of cylinders that there is no chance for a first contact with the spheres belonging to those cylinders, then in the preferred implementation they are dismissed from further consideration. If the submode number of a sphere belongs to an out-of-range cylinder, no further processing is required in the preferred implementation. Let W_(k) be the cylinder wall radius for the k-th particle submode. If

(W _(k) +a _(k))² ≦X _(c) ² +Y _(c) ²  (34)

[0292] then no k-th mode sphere is a candidate for first contact with the descending current sphere in this implementation.

[0293] In summary then, FOBJ1 searches the list of all placed pack spheres above the catch net for the submode to which the current sphere belongs, excluding all placed spheres that may be in interior cylinders that the current sphere cannot contact or overlap. The possibility of overlap in the x directions is checked, followed by the possibility of overlap in the y directions, followed by a direct calculation of overlap. The altitude z_(c)(j) at which the current sphere would contact Sphere j is stored and that sphere is rejected if other placed pack spheres have a higher contact altitude. Again, if no pack spheres make contact before the current sphere reaches the catch net or water level, it stops and is placed there.

[0294] Detail of Subroutine FOBJ2

[0295] Subroutine FOBJ2 finds the second object to be contacted by the descending current sphere. FOBJ2 would only have been called if the current sphere had first contacted a single pack sphere that has been denoted Sphere 1. If it had contacted the catch net or water level, the current sphere would have been placed there and FOBJ2 would never have been called. If it had contacted more than one sphere simultaneously, FOBJ3 and/or STABLE would have been called. FOBJ2 is called only if a single pack sphere's northern hemisphere has been touched.

[0296] When the current sphere touches the northern hemisphere of Sphere 1, it begins to roll down the path of steepest descent which is Sphere 1's longitudinal line passing through the point of contact. The volume swept out as the current sphere descends along this path toward the equator is called the roll corridor. The end of the roll corridor is either where the current sphere's center reaches the equatorial plane of the Sphere 1, reaches its cylinder wall, or reaches the catch net or water level, whichever is higher. The preferred implementation identifies all other pack spheres that protrude into the roll corridor.

[0297] Processing can be somewhat simplified if the cylinder wall is assumed to be the boundary that the center of the current sphere cannot pass, rather than the boundary through which its leading edge equator cannot pass.

[0298] If the center of the current sphere intersects the cylinder wall during descent, then that point is the end of the roll corridor because it will at least have found the wall as its second object if no other pack sphere has been contacted first.

[0299] The beginning of the roll corridor is then the place of initial contact between the current sphere and Sphere 1. The current sphere's polar angle at that initial contact is given by

θ_(ci)=cos⁻¹[(Z _(c) −Z ₁)/(a _(c) +a ₁)].  (35)

[0300] The end of the roll corridor θ_(cf) will either be at the equatorial plane of Sphere 1 or where the center of the current sphere intersects the catch net, the water level, or the cylinder wall. If it is at the equatorial plane, then

θ_(cf)=π/2.  (36)

[0301] If the altitude of the catch net Z_(net)≧Z₁−a_(c), then

θ_(cf)=cos⁻¹[(Z _(net) +a _(c) −Z ₁)/(a _(c) +a ₁)].  (37)

[0302] If the altitude of the water level Z_(w)≧Z₁−a_(c), then

θ_(cf)=cos⁻¹[(Z _(w) +a _(c) −Z ₁)/(a _(c) +a ₁)].  (38)

[0303] The last possibility is that the roll corridor ends with an intersection of the cylinder wall. Let φ_(c) be the azimuthal position at which the current sphere has touched Sphere 1. It is given by

φ_(c)=tan⁻¹[(Y _(c)−Y₁)/(X _(c) −X ₁)].  (39)

[0304] The radial position of the current sphere as it descends Sphere 1 as a function of θ_(c) is given by

{[X ₁+(a _(c) +a ₁)sin θ_(c) cos φ_(c)]² +[Y ₁+(a _(c) +a ₁)sin θ_(c) sin φ_(c)]²}^(½).  (40)

[0305] If this radial position is equal to the cylinder radius W for some value of θ_(c) between 0 and π/2, then the roll corridor intersects the cylinder wall. Setting this expression equal to W. squaring both sides, and solving the quadratic equation for sin θ_(c) gives $\begin{matrix} {{\sin \quad \theta_{cf}} = \frac{\begin{matrix} {{- \left( {{X_{1}\cos \quad \phi_{c}} + {Y_{1}\sin \quad \phi_{c}}} \right)} \pm} \\ \sqrt{\left( {{X_{1}\cos \quad \phi_{c}} + {Y_{1}\sin \quad \phi_{c}}} \right)^{2} + W^{2} - X_{1}^{2} - Y_{1}^{2}} \end{matrix}}{a_{c} + a_{1}}} & (41) \end{matrix}$

[0306] Because θ_(cf) is a polar angle, it lies in the range [0,π]. Therefore, sin θ_(cf) can never be negative. If both right hand side solutions of Eq. (41) are greater than unity, there is no solution and the current sphere does not intersect the cylinder wall. If both are less than or equal to unity, then we choose the larger one.

[0307] The presently preferred implementation conducts appropriate processing to evaluate each of these possible circumstances. Before evaluating Eq. (41), the program code according to this implementation adds the global radial position of Sphere 1 to the sum of the radii of Sphere 1 and the current sphere. If this sum is less than or equal to W, then the sphere cannot hit the cylinder wall in any case so the more involved evaluation above is unnecessary and preferably is not performed.

[0308] The end of the roll corridor is the minimum θ_(cf) of Eqs. (36, 37, 38, and 41). If the current sphere encounters the catch net or water level, it is placed there.

[0309] The preferred implementation also checks for all pack spheres whose volumes intrude upon the roll corridor swept out by the current sphere which covers the arc from θ_(ci) to θ_(cf) and azimuth φ_(c) on Sphere 1. If there is a θ_(c) with smaller value than the end of the roll corridor θ_(cf) at which the current sphere encounters one or more pack spheres, then the sphere or spheres touched are noted. Program control is then passed to subroutines that deal with simultaneous contact of two or more spheres, as described herein.

[0310] If no pack spheres overlap the roll corridor, then the current sphere is placed if it hits the catch net or water level. If it hits neither of these, then it rolls to the equator and drops from there. At that point it is a free falling sphere again so FOBJ1 is re-called.

[0311] We now turn our attention to finding which placed pack spheres overlap the roll corridor and at what point the current sphere would strike them as it descends from θ_(ci). The term “global coordinate system” is used herein when discussing a single coordinate system in which the entire pack is defined. Capital letters are used when referring to a global coordinate system, ${e.g.},{{\overset{\rho}{R}}_{i} = \left( {X_{i},Y_{i},Z_{i}} \right)}$

[0312] for the Cartesian position of the i-th sphere.

[0313] A local coordinate system, on the other hand, is one whose origin is at the center of one of the spheres and whose axes are parallel to the global axes. We use small letters to define it, ${e.g.},{{\overset{\rho}{r}}_{i} = \left( {x_{i},y_{i},z_{i}} \right)}$

[0314] for a position relative to the center of the i-th sphere.

[0315] Consider the j-th pack sphere. Its center is at global position R_(j)=(X_(j), Y_(j), Z_(j)) and its radius is a_(j). In the global coordinate system, the position of the current sphere as it descends along Sphere i is $\begin{matrix} {{\overset{\rho}{R}}_{c} = {{\overset{\rho}{R}}_{i} + {\left( {a_{c} + a_{i}} \right){\left( {{\sin \quad \theta_{c}\cos \quad \phi_{c}\hat{i}} + {\sin \quad \theta_{c}\sin \quad \phi_{c}\hat{j}} + {\cos \quad \theta_{c}\hat{k}}} \right).}}}} & (42) \end{matrix}$

[0316] The current sphere rolls into Sphere j if there is a solution θ_(c) that lies in the interval θ_(ci)<θ_(c)<θ_(cf) to the equation $\begin{matrix} {{{\overset{\rho}{R_{c}} - \overset{\rho}{R_{j}}}} = {a_{c} + {a_{j}.}}} & (43) \end{matrix}$

[0317] If this equation can be satisfied at all, it will have two solutions: one where the current sphere touches Sphere j from above and another where the current sphere touches Sphere j from below. (If it just nicks Sphere j, these two solutions can be at the same θ_(c), but if Sphere j is just nicked, the preferred implementation considers that a miss.) We are only interested in the top or smaller θ_(c) solution, and then only if the top θ_(c) lies in the roll corridor range.

[0318] Explicitly, the equation to be solved is

[X _(i) −X _(j)+(a _(c) +a _(i))sin θ_(c) cos φ_(c)]² +[Y _(i) −Y _(j)+(a _(c) +a _(i))sin θ_(c) sin φ_(c)]² +[Z _(i) −Z _(j)+(a _(c) +a _(i))cos θ_(c)]²=(a _(c) +a _(j))²  (44)

[0319] which, defining X_(ij)≡X_(i)−X_(j), Y_(ij)≡Y_(i)−Y_(j), and Z_(ij)≡Z_(i)−Z_(j), can be rewritten

(X _(ij) cos φ_(c) +Y _(ij) sin φ_(c))sin θ_(c) +Z _(ij) cos θ_(c)=[(a _(j) −a _(i))(a _(j) +a _(i)+2a _(c))−R _(ij) ²]/[2(a _(c) +a _(i))]  (45)

[0320] where

R _(ij) ² =X _(ij) ²+Y_(ij) ²+Z_(ij) ².  (46)

[0321] This equation has the form

A sin θ_(c) +B cos θ_(c) =C  (47)

[0322] where

A=X _(ij) cos φ_(c) +Y _(ij) sin φ_(c)  (48)

B=Z_(ij)  (49)

C=[(a _(j) −a _(i))(a _(j) +a _(i)+2a _(c)−) R _(ij) ²]/[2(a _(c) +a _(i))].  (50)

[0323] Dividing through by {square root}(A²+B²), we obtain

cos α sin θ_(c)+sin α cos θ_(c) =C/{square root}(A ² +B ²)  (51)

[0324] where

cos α=A/{square root}(A ² +B ²)  (52)

[0325] and

sin α=B/{square root}(A ² +B ²)  (53)

[0326] A common trigonometric identity turns Eq. (51) into

sin(θ_(c)+α)=C/{square root}(A ² +B ²)  (54)

[0327] which has solution

θ_(c)=sin⁻¹ [C/{square root}(A ² +B ²)]−α  (55)

[0328] where

α=tan⁻¹ [A/B].  (56)

[0329] If |C/{square root}(A²+B²)|>1, then there is no solution and the j-th sphere does not overlap the roll corridor.

[0330] The FORTRAN function ATAN2(A,B) or its equivalent in other programming languages uses information on the signs of A and B to determine in which quadrant α lies so it is uniquely defined. The arcsine, however, has two solutions. One solution is the principal value which lies in [−π/2,π/2] and is found by the standard FORTRAN function ASIN or its equivalent. The other solution is π minus this principal value. These two solutions comprise the two solutions for the current sphere contacting Sphere j on either side along the longitude line defined by azimuthal angle φ_(c). Denoting the principal value by capitalizing the arcsine, the two solutions are

θ_(c1)=Sin⁻¹ [C/{square root}(A ² +B ²)]−α  (57a)

[0331] and

θ_(c2)=π−Sin⁻¹ [C/{square root}(A ² +B ²)]−α.  (57b)

[0332] If either of these θ lie outside [0,2π), then 2π must be added or subtracted enough times to bring the solutions back into [0,2π). If neither of these solutions lie in the open interval (θ_(ci), θ_(cf)), then the current sphere does not contact Sphere j. If one solution does lie in (θ_(ci), θ_(cf)), that is the position at which the second contact is made. If both do, the lesser of the two solutions is the position of second contact.

[0333] Finally, whichever pack sphere has the smallest θ_(c) is Sphere 2. That point of contact is denoted θ_(cj). If two or more pack spheres are contacted simultaneously, then all their index numbers are returned by FOBJ2. If the cylinder wall and one or more pack spheres are contacted simultaneously, their index numbers are returned and the flag indicating a wall contact is activated.

[0334] As the preferred implementation searches through the pack spheres to find which is touched first, there are several efficiency criteria can be used to eliminate most spheres from the detailed consideration of the above equations.

[0335] First, if the roll corridor is far enough away from the global Z axis, then the current sphere may not be able to approach some inner cylinders closely enough to touch their spheres. Therefore, those pack spheres whose mode number indicates they belong to the inner cylinders need not be considered further. The preferred implementation can determine which cylinder's spheres can never intersect the current sphere's roll corridor?

[0336] Because the current sphere rolls down a longitude line on Sphere i, when viewed from above, its projection is a straight line segment on the XY plane with beginning point (X_(ci), Y_(ci)) and ending point (X_(cf), Y_(cf)) where

X _(ci) =X _(i)+(a _(c) +a _(i))sin θ_(ci) cos φ_(c)  (58a)

Y _(ci) =Y _(i)+(a _(c) +a _(i))sin θ_(ci) sin φ_(c)  (58b)

X _(cf) =X _(i)+(a _(c) +a _(i))sin θ_(cf) cos φ_(c)  (58c)

Y _(cf) =Y _(i)+(a _(c) +a _(i))sin θ_(cf) sin φ_(c).  (58d)

[0337] To find whether this line segment comes close enough to the l-th cylinder to touch any of its spheres, the preferred implementation turns the current sphere's position into a pair of parametric equations:

X _(c) =X _(ci)+(X _(cf) −X _(ci))s  (59a)

Y _(c) =Y _(ci)+(Y _(cf) −Y _(ci))s  (59b)

[0338] where s is a dimensionless parameter that is zero at the beginning of the roll corridor and unity at the end. In order for the current sphere to have any chance of touching an l-th mode sphere, it must come closer than the sum of its radius plus an l-th sphere's radius from the l-th cylinder wall which has radius W_(l). In other words, some portion of the roll corridor must come within W_(l)+a_(l)+a_(c) of the global Z axis. This condition is expressed by

X _(c) ² +Y _(c) ²=(W _(l) +a _(l) +a _(c))²  (60)

[0339] for a value s somewhere in the open interval (0,1). If Eq. (60) is never satisfied, then the current sphere cannot touch any of the l-th mode spheres. Explicitly written, Eq. (60) is a quadratic equation in s:

As ²+2Bs+C=0  (61)

[0340] where

A=(X _(cf) −X _(ci))²+(Y _(cf) −Y _(ci))²  (62)

B=X _(ci)(X _(cf) −X _(ci))+Y _(ci)(Y _(cf) −Y _(ci))  (63)

C=X _(ci) ² +Y _(ci) ²−(W _(l) +a _(l) +a _(c))².  (64)

[0341] The solutions are $\begin{matrix} {s = \frac{{- B} \pm \sqrt{B^{2} - {A\quad C}}}{A}} & (65) \end{matrix}$

[0342] If B²−AC is negative, there is no solution. If it is zero, there is only one real solution which means the roll corridor just grazes the l-th cylinder, in which case it is considered a miss. If it is positive, there are two real solutions. The preferred implementation solves for both of them, and checks to determine whether either one lies in the open interval (0,1). If one or both lie in this interval, the l-th mode spheres are candidates for touching the descending current sphere.

[0343] To find which cylinders are inaccessible to the current sphere, the preferred implementation starts with the innermost cylinder (l=1) and continues outwardly until it reaches a cylinder that is big enough that it is accessible. All larger cylinders also will be accessible.

[0344] There also is a simple altitude criteria to delimit detailed consideration of pack spheres as candidates for touching the current sphere. The global altitudes of the beginning and end of the roll corridor are

Z _(ci) =Z _(i)+(a _(c)+a_(i))cos θ_(ci)  (66a)

Z _(cf) =Z _(i)+(a _(c)+a_(i))cos θ_(cf),  (66b)

[0345] respectively. Therefore, if a j-th pack sphere lies below the end of the roll corridor by the amount

Z _(j) <Z _(cf) −a _(c) −a _(j)  (67a)

[0346] or lies above the top of the roll corridor by the amount

Z _(j) ≧Z _(ci) +a _(c) +a _(j),  (67b)

[0347] then it is not a candidate for touching the current sphere.

[0348] Likewise, spheres lying beyond the roll corridor in the x and y directions need not be further considered, i.e., if

X _(j) ≦X _(cf) −a _(c) −a _(j)  (67c)

Y _(j) ≦Y _(cf) −a _(c) −a _(j)  (67d)

[0349] or

X _(j) ≧X _(ci) +a _(c) +a _(j)  (67e)

Y _(j) ≧Y _(ci) +a _(c) +a _(j),  (67f)

[0350] then the j-th sphere lies beyond the roll corridor in the horizontal plane and is not a candidate for touching the current sphere.

[0351] Detail of Subroutine FOBJ3

[0352] Subroutine FOBJ3 finds the third object to be contacted by the descending current sphere when it is already in contact with two and only two other objects. There are only two possibilities for the two initial contacts: (1) both are placed pack spheres or (2) one is a placed pack sphere and the other is the cylinder wall for the submode of the current sphere. Each of these possibilities will now be addressed in turn.

[0353] Touching Two Spheres

[0354] It is presumed at the outset of this discussion that the two touching spheres, i and j, are in stable (compressive) contact, subroutine STABLE already having been called to remove them if they are not. A roll corridor follows a circle defined where the current sphere is in contact with both Spheres i and j. Of course, the current sphere cannot touch both spheres unless the condition r_(ji)<a_(i)+a_(j)+2a_(c) is satisfied where r_(ji) is the center-to-center distance between Spheres i and j.

[0355] The current sphere's descent along this roll corridor will be defined by a single variable φ_(c)′. This variable is the azimuthal angle of a local tilted coordinate system whose origin is in the center of Sphere i, with z axis tilted so it passes through the center of Sphere j, and with x axis swung upward so that it lies in a vertical plane. In that coordinate system (which is denoted herein by primes), φ_(c)′ alone describes the current sphere's position along the roll corridor. In the unlikely event that the current sphere finds itself perfectly balanced on Spheres i and j so that φ_(c)′=0, then a random number generator determines in which direction the current sphere will roll—toward negative φ_(c)′ or toward positive φ_(c)′.

[0356] To find the coordinates of a pack sphere, say the k-th sphere, in this primed coordinate system, the preferred implementation first translates the global sphere positions to the unprimed local coordinate system whose origin is at the center of Sphere i but whose axes are parallel to the global axes: $\begin{matrix} {{\overset{\rho}{r}}_{k\quad i} = {{\overset{\rho}{R}}_{k} - {{\overset{\rho}{R}}_{i}.}}} & (68) \end{matrix}$

[0357] Capital letters are used herein to denote coordinates in the global coordinate system, small letters in the unprimed local system (local to Sphere i), and primed small letters in the local tilted coordinate system.

[0358] The Euler matrix used to rotate the unprimed into the primed coordinate system is given by $\begin{matrix} {A = {\begin{pmatrix} {{- \cos}\quad \theta_{ji}\cos \quad \phi_{ji}} & {{- \cos}\quad \theta_{ji}\sin \quad \phi_{ji}} & {\sin \quad \theta_{ji}} \\ {\sin \quad \phi_{ji}} & {{- \cos}\quad \phi_{ji}} & 0 \\ {\sin \quad \theta_{ji}\cos \quad \phi_{ji}} & {\sin \quad \theta_{ji}\sin \quad \phi_{ji}} & {\cos \quad \theta_{ji}} \end{pmatrix}.}} & (69) \end{matrix}$

[0359] where θ_(ji) and φ_(ji) are the polar and azimuthal angles of Sphere j relative to Sphere i and are given by

cos θ_(ji)=(Z _(j) −Z _(i))/r _(ji)  (70a)

[0360] and

φ_(ji)=tan⁻¹[(Y _(j) −Y _(i))/(X_(j) −X _(i))].  (70b)

[0361] This Euler matrix allows the preferred implementation to obtain the k-th sphere's position in the primed coordinate system as $\begin{matrix} {\overset{\rho}{r_{ki}^{\prime}} = {A \cdot {\overset{\rho}{r_{ki}}.}}} & (71) \end{matrix}$

[0362] The current sphere's initial position in the primed coordinate system is given in like manner: $\begin{matrix} {\overset{\rho}{r_{ci}} = {\overset{\rho}{R_{c}} - \overset{\rho}{R_{i}}}} & (72) \\ {\overset{\rho}{r_{ci}^{\prime}} = {A \cdot {\overset{\rho}{r_{ci}}.}}} & (73) \end{matrix}$

[0363] Now that the three components of the vector ${\overset{\rho}{r}}_{c\quad i}^{\prime}$

[0364] have been obtained, the preferred implementation can find the initial azimuthal position

φ_(ci)′=tan⁻¹(y _(ci) ′/x _(ci)′).  (74)

[0365] If φ_(ci)′ is positive, the current sphere will roll toward higher positive values. If it is negative, it roll toward more negative values (higher in magnitude). In the unlikely case that it is zero, a random number generator chooses which direction it will roll.

[0366] The polar angle of the center of the current spheres in the primed coordinate system is constant as long as it is in the roll corridor. It is obtained from the law of cosines as

cos θ_(c) ′=[r _(ji) ²+(a _(c) +a _(i))²−(a _(c) +a _(j))²][2r _(ji)(a _(c) +a _(i))]⁻¹  (75)

[0367] with

sin θ_(c)′=+[1−cos² θ_(c)′]^(½).  (76)

[0368] There are several possible outcomes as the current sphere descends its roll corridor. It can

[0369] hit the catch net or water level;

[0370] lose contact with Sphere i or Sphere j or both simultaneously;

[0371] hit the cylinder wall; or

[0372] hit another pack sphere or several pack spheres simultaneously.

[0373] The roll corridor ends when the current sphere encounters the first of these situations. The preferred implementation then finds the φ_(c)′ at which one of these events happens. The event with the smallest magnitude for φ_(c)′ will be the bottom of the roll corridor and will be denoted φ_(cf)′.

[0374] Hitting the Catch Net or Water Level

[0375] First, the preferred implementation finds the global altitude of the current sphere as a function of φ_(c)′: $\begin{matrix} {\overset{\rho}{R_{c}} - \overset{\rho}{R_{i}} + {A^{- 1} \cdot \overset{\rho}{r_{c}^{\prime}}}} & (77) \end{matrix}$

[0376] where the inverse Euler matrix is equal to its transpose A⁻¹=A^(T) because of its orthogonality. The current sphere's global Z component is given by

Z _(c) =Z _(i)+(a _(c) +a _(i))(sin θ_(ji) sin θ_(c)′ cos φ_(c)′+cos θ_(ji) cos θ_(c)′).  (78)

[0377] Its south pole hits the catch net if Z_(c)=Z_(net)+a_(c). Solving for the primed azimuthal angle φ_(c)′ at which this equation may be satisfied, we have $\begin{matrix} {{\cos \quad \phi_{c}^{\prime}} = \frac{\frac{Z_{net} + a_{c} - Z_{i}}{a_{c} + a_{i}} - {\cos \quad \theta_{ji}\cos \quad \theta_{c}^{\prime}}}{\sin \quad \theta_{ji}\sin \quad \theta_{c}^{\prime}}} & (79) \end{matrix}$

[0378] where the sign of φ_(c)′ is the same as the sign of φ_(ci)′, the angle at the top of the roll corridor. If this equation does not have a real solution in (0,π/2), then the current sphere does not reach the catch net in this roll corridor. If φ_(c)′ is outside the range [0,2π), then units of 2π are either added or subtracted from φ_(c)′ until it does lie within that range. Because neither θ_(ji) nor θ_(c)′ can ever be zero or π, Eq. (79) is never singular.

[0379] The preferred implementation also can find which water level the current sphere might hit. Water level altitudes between adjacent cylinder walls are generally different as the pack is constructed. The only condition under which the current sphere might contact the k-th water level Z_(w)(k) is if and only if the distance P_(c) of the current sphere from the global Z axis lies between cylinder wall radii W_(k−1) and W_(k) at the point of contact. P_(c) is given by

P _(c)=(X _(c) ² +Y _(c) ²)^(½)  (80)

[0380] where X_(c) and Y_(c) can be obtained from Eq. (77) as

X _(c) =X _(i)+(a _(c) +a _(i))(−cos θ_(ji) cos φ_(ji) sin θ_(c)′ cos φ_(c)′+sin φ_(ji) sin θ_(c)′ sin φ_(c)′+sin θ_(ji) cos φ_(ji) cos θ_(c)′)  (81a)

[0381] and

Y _(c) =Y _(i)+(a _(c) +a _(i))(−cos θ_(ji) sin φ_(ji) sin θ_(c)′ cos φ_(c)′−cos φ_(ji) sin θ_(c)′ sin φ_(c)′+sin θ_(ji) sin φ_(ji) cos θ_(c)′)  (81b)

[0382] Using the square of P_(c) rather than Eq. (80), the water level checked for contact is Z_(w)(k) if W_(k−1) ²<P_(c) ²≦W_(k) ². Actually, each annular region between the (k−1)-th and k-th cylinder walls is checked to see if the roll corridor has a possibility of contacting the water level there.

[0383] The expression for the φ_(c)′ at which the south pole of the current sphere touches the k-th water level is the same as Eq. (79) with Z_(net) replaced by Z_(w)(k). Then the end of the roll corridor φ_(cf)′ is either ±π/2 or a contact point with the catch net or a water level as given by Eq. (79).

[0384] Losing Contact with One or Both Spheres

[0385] The preferred implementation also can determine the φ_(c)′ at which the current sphere will lose contact with either Sphere i or j or both if it encounters nothing else as it descends its roll corridor.

[0386] Of the two spheres, i and j, the one whose center is higher by the subscript u and the one whose center is lower is denoted by l. Their global positions are (X_(u), Y_(u), Z_(u)) and (X_(l), Y_(l), Z_(l)) and their radii are a_(u) and a_(l), respectively. We always have that Z_(u)≧Z_(l). Consider the unprimed coordinate system whose origin is in the center of the lower sphere and whose axes are parallel to the global axes. Let θ_(c) and φ_(c) be the polar and azimuthal angular position of the current sphere in the unprimed local coordinate system centered in the lower sphere.

[0387] As before, the primed coordinate system is the system obtained by tilting the unprimed z axis into the center of the upper sphere and then rotating the xy axes of that tilted coordinate system about its z′ axis until its x′ axis is pointing as steeply upward as possible, i.e., has a maximum positive projection onto the unprimed z axis. This rotation is what Eq. (69) does if i is replaced by l and j by u. The polar and azimuthal angular positions of the current sphere in the tilted coordinate system are θ_(c)′ and φ_(c)′, respectively where cos θ_(c)′ is given by Eq. (75) with the same change in indices mentioned in the previous sentence.

[0388] The current sphere will lose contact with the upper sphere first. If both lower and upper spheres are at the same altitude, it will lose contact with them both simultaneously. To find the φ_(c)′ position at which the current sphere loses contact with the upper sphere, the preferred implementation finds the two longitude lines of the lower sphere in the unprimed coordinate system along which the current sphere would just nick the upper sphere if it were descending along those longitude lines. The two φ_(c) at which that happens are the ends of the roll corridor at which the current sphere would lose contact with the upper sphere and roll on the lower alone. Because the current sphere is rolling down only one side of the roll corridor, only that side's φ_(c) is of interest.

[0389] In the unprimed local coordinate system, the current sphere is at $\begin{matrix} {{{\overset{\rho}{r}}_{c} = {\left( {a_{c} + a_{i}} \right)\left( {{\hat{i}\quad \sin \quad \theta_{c}\cos \quad \varphi_{c}} + {\hat{j}\quad \sin \quad \theta_{c}\sin \quad \phi_{c}} + {\hat{k}\quad \cos \quad \theta_{c}}} \right)}}{a\quad n\quad d\quad t\quad h\quad e\quad u\quad p\quad p\quad e\quad r\quad s\quad p\quad h\quad e\quad r\quad e\quad a\quad t}} & (82) \\ {{{\overset{\rho}{r}}_{u} = {r_{u}\left( {{\hat{i}\quad \sin \quad \theta_{u}\cos \quad \varphi_{u}} + {\hat{j}\quad \sin \quad \theta_{u}\sin \quad \phi_{u}} + {\hat{k}\quad \cos \quad \theta_{u}}} \right)}}C\quad o\quad n\quad s\quad i\quad d\quad e\quad r\quad t\quad h\quad e\quad e\quad q\quad u\quad a\quad t\quad i\quad o\quad n} & (83) \\ {\left| {{\overset{\rho}{r}}_{c} - {\overset{\rho}{r}}_{u}} \right| = {a_{c} + {a_{u}.}}} & (84) \end{matrix}$

[0390] If both sides are squared and written explicitly, we obtain

[(a _(c) +a _(l))² sin θ_(c) cos φ_(c) −x _(u)]²+[(a _(c) +a _(l))² sin θ_(c) sin φ_(c) −y _(u)]²+[(a _(c) +a _(l))² cos θ_(c) −z _(u)]²=(a _(c) +a _(u))²  (85)

[0391] which can be rewritten $\begin{matrix} {\frac{r_{u}^{2} + \left( {a_{c} + a_{l}} \right)^{2} - \left( {a_{c} + a_{u}} \right)^{2}}{2\left( {a_{c} + a_{l}} \right)} = {{x_{u}\sin \quad \theta_{c}\cos \quad \phi_{c}} + {y_{u}\sin \quad \theta_{c}\sin \quad \phi_{c}} + {z_{u}\cos \quad {\theta_{c}.}}}} & \text{(85b)} \end{matrix}$

[0392] The components x_(u), y_(u), and z_(u) are given in Eq. (83). If they are substituted into Eq. (85b) and both sides are divided by r_(u), we obtain $\begin{matrix} {\frac{r_{u}^{2} + \left( {a_{c} + a_{l}} \right)^{2} - \left( {a_{c} + a_{u}} \right)^{2}}{2\left( {a_{c} + a_{l}} \right)r_{u}} = {{\sin \quad \theta_{u}\cos \quad \phi_{u}\sin \quad \theta_{c}\cos \quad \phi_{c}} + {\sin \quad \theta_{u}\sin \quad \phi_{u}\sin \quad \theta_{c}\sin \quad \phi_{c}} + {\cos \quad \theta_{u}\cos \quad \theta_{c}}}} & (86) \end{matrix}$

[0393] where we recognize the left hand side as cos θ_(c)′, the polar angle in the primed coordinate system which is constant as the current sphere descends the roll corridor. Now Eq. (86) can be written as

cos θ_(c)′=sin θ_(u) sin θ_(c)(cos φ_(u) cos φ_(c)+sin φ_(u) sin φ_(c))+cos θ_(u) cos θ_(c)  (87a)

[0394] which through a trigonometric identity can be written

cos θ_(c)′=sin θ_(u) sin θ_(c) cos(φ_(c)−φ_(u))+cos θ_(u) cos θ_(c).  (87b)

[0395] We wish to solve for θ_(c) from this equation. For a given φ_(c), the θ_(c) solution has three possibilities:

[0396] 1. There are two θ_(c) solutions if the current sphere hits the upper sphere as it rolls down the φ_(c) longitude line of the lower sphere—one solution where it touches the upper sphere from above and the other where it touches from below;

[0397] 2. There is one solution (the two solutions having become degenerate) where the current sphere just nicks the upper sphere while rolling along the φ_(c) longitude line; and

[0398] 3. There are no real solutions, meaning the current sphere altogether misses the upper sphere while rolling along the φ_(c) longitude line.

[0399] The second possibility is the one of current interest because that is the point at which the current sphere can lose contact with the upper sphere and roll on the longitude line of the lower sphere. We will call that point the “departure point.” Therefore, the preferred implementation first finds the angular position (θ_(c), φ_(c)) of the departure point and then finds the azimuthal angle φ_(c)′ in the primed coordinate system to which this angular position corresponds.

[0400] To solve for θ_(c), given a particular φ_(c), the preferred implementation recasts Eq. (87b) is recast into the form $\begin{matrix} {\frac{\cos \quad \theta_{c}^{\prime}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}} = {{\sin \quad {\alpha sin\theta}_{c}} + {\cos \quad {\alpha cos}\quad \theta_{c}}}} & (88) \end{matrix}$

[0401] where $\begin{matrix} {{\sin \quad \alpha} = \frac{\sin \quad \theta_{u}{\cos \left( {\phi_{c} - \phi_{u}} \right)}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}}} & \text{(89a)} \end{matrix}$

[0402] and $\begin{matrix} {{\cos \quad \alpha} = {\frac{\cos \quad \theta_{u}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}}.}} & \text{(89b)} \end{matrix}$

[0403] Applying our trigonometric identity to the right hand side of Eq. (88), we obtain $\begin{matrix} {{\cos \left( {\theta_{c} - \alpha} \right)} = \frac{\cos \quad \theta_{c}^{\prime}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}}} & (90) \end{matrix}$

[0404] which gives the solution $\begin{matrix} {\theta_{c} = {\alpha + {{\cos^{- 1}\left\lbrack \frac{\cos \quad \theta_{c}^{\prime}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}} \right\rbrack}.}}} & (91) \end{matrix}$

[0405] The arccosine generally has two distinct solutions: (1) the principal value which lies in the interval [0,π] and which is denoted by capitalizing the function as Cos⁻¹ and (2) the negative of the principal value. We are interested in the case where these two solutions are degenerate. That can only be so if the arccosine and its negative are the same value, i.e., zero. Therefore θ_(c)=α at the departure point, and the argument of the arccosine in Eq. (91) must be unity: $\begin{matrix} {\frac{\cos \quad \theta_{c}^{\prime}}{\sqrt{{\sin^{2}\theta_{u}{\cos^{2}\left( {\phi_{c} - \phi_{u}} \right)}} + {\cos^{2}\theta_{u}}}} = 1.} & (92) \end{matrix}$

[0406] This equation is the condition used in the preferred implementation to find the unprimed azimuthal position of the departure point. Squaring both sides gives

cos² θ_(c)′=sin² θ_(u) cos²(φ_(c)−φ_(u))+cos² θ_(u)  (93)

[0407] which can be solved for φ_(c) to yield $\begin{matrix} {\phi_{c} = {\phi_{u} + {{\cos^{- 1}\left\lbrack \sqrt{\frac{{\cos^{2}\theta_{c}^{\prime}} - {\cos^{2}\theta_{u}}}{\sin^{2}\theta_{u}}} \right\rbrack}.}}} & \text{(94)} \end{matrix}$

[0408] The square root has a positive sign because the difference between φ_(c) and φ_(u) can be no greater in magnitude than π/2. Again, the arccosine has two solutions: the principal value Cos⁻¹ and its negative −Cos⁻¹. The current sphere would lose contact with the upper sphere if it is at azimuthal position φ_(u)+Cos⁻¹. Its true position depends on where it was initially. If its initial position φ_(ci)>φ_(u), then the principal value Cos⁻¹ is used. If its initial position φ_(ci)<φ_(u), then the negative of the principal value is used −Cos⁻¹. In the unlikely case that the initial position equals φ_(u), then the current sphere is balanced on the upper and lower sphere and a direction is randomly chosen by the random number generator. The preferred implementation using these relationships to determine where contact is lost.

[0409] The preferred implementation also determines (θ_(c), φ_(c)) of the departure point. It then finds the departure point in the primed coordinate system by use of the Euler transformation of Eqs. (69) and (73).

[0410] The first component of the primed vector is given by

sin θ_(c)′ cos φ_(c)′=−cos θ_(u) sin θ_(c)(cos φ_(u) cos φ_(c)+sin φ_(u) sin φ_(c))+sin θ_(u) cos θ_(c)  (95)

[0411] where the expression in parentheses can be written cos(φ_(c)−φ_(u)). Eq. (94) can substitute for cos(φ_(c)−φ_(u)). Also because θ_(c) is equal to α of Eqs. (89), we have $\begin{matrix} {{\sin \quad \theta_{c}} = \frac{\sqrt{{\sin^{2}\theta_{u}} - {\sin^{2}\theta_{c}^{\prime}}}}{\cos \quad \theta_{c}^{\prime}}} & \text{(96a)} \\ {{\cos \quad \theta_{c}} = {\frac{\cos \quad \theta_{u}}{\cos \quad \theta_{c}^{\prime}}.}} & \text{(96b)} \end{matrix}$

[0412] Substituting Eqs. (94) and (96) into (95), we obtain for the end of the roll corridor due to departure $\begin{matrix} {{\cos \quad \phi_{cf}^{\prime}} = {\frac{\cos \quad \theta_{u}\sin \quad \theta_{c}^{\prime}}{\sin \quad \theta_{u}\cos \quad \theta_{c}^{\prime}} = {\frac{\tan \quad \theta_{c}^{\prime}}{\tan \quad \theta_{u}}.}}} & \text{(97)} \end{matrix}$

[0413] The preferred implementation uses this relationship to obtain θ_(c) and φ_(c). Notice that the current sphere cannot be in stable contact with two pack spheres unless θ_(c)′<θ_(u). Therefore φ_(cf)′ always lies between 0 and π/2. Also, remember that cos θ_(c)′ is given by the left hand side of Eq. (86) and that sin θ_(c)′=+[1−cos² θ_(c)′]^(½).

[0414] The second component of the primed vector is given by

sin θ_(c)′ sin φ_(c)′=(sin φ_(u) cos φ_(c)−cos φ_(u) sin φ_(c))sin θ_(c)  (98)

[0415] and the same set of substitutions leads to $\begin{matrix} {{\sin \quad \phi_{cf}^{\prime}} = {\frac{\sqrt{{\sin^{2}\theta_{u}} - {\sin^{2}\theta_{c}^{\prime}}}}{\cos \quad \theta_{c}^{\prime}\sin \quad \theta_{u}}.}} & \text{(99)} \end{matrix}$

[0416] The φ_(cf)′ defined by Eqs. (97) and (99) is the departure point and is the end of the roll corridor. At this position, the current sphere loses contact with the upper sphere (or both if their centers are the same altitude). These relationships also are used in the preferred implementation to determine θ_(c) and φ_(c).

[0417] Hitting the Cylinder Wall

[0418] The cylinder wall for the current sphere is located at global radius W. The preferred implementation can find whether the roll corridor of the current sphere on the two pack spheres is such that the current sphere's center can intersect the cylinder wall. If it does, then the φ_(c)′ of intersection is found.

[0419] We need the global position of the current sphere as a function of φ_(c)′. Again, the global position of the current sphere is

[0420] $\begin{matrix} {{\overset{\rho}{R}}_{c} = {{\overset{\rho}{R}}_{i} + {\overset{\rho}{r}}_{c}}} & (100) \end{matrix}$

[0421] where ${\overset{\rho}{R}}_{i}$

[0422] is the global position of one of the contact spheres and ${\overset{\rho}{r}}_{c}$

[0423] is the current sphere's position in the unprimed local coordinate system. (Remember the unprimed coordinate system is centered in Sphere i and has axes parallel to the global axes.) The unprimed vector is given in terms of the primed vector (that contains φ_(c)′) by the inverse Euler matrix equation $\begin{matrix} {{\overset{\rho}{r}}_{c} = {A^{- 1} \cdot \overset{\rho}{r_{c}^{\prime}}}} & (101) \end{matrix}$

[0424] where A⁻¹ is the transpose of the Euler matrix in Eq. (69) and r_(c)′=(x_(c)′, y_(c)′, z_(c)′) is given by

x _(c)′=(a _(c) +a _(i))sin θ_(c)′ cos φ_(c)′  (102a)

y _(c)′=(a _(c) +a _(i))sin θ_(c)′ sin φ_(c)′  (102b)

z _(c)′=(a _(c) +a _(i))cos θ_(c)′.  (102c)

[0425] The preferred implementation therefore finds the global position R_(c)=(X_(c), Y_(c), Z_(c)) in terms of the single variable φ_(c)′ describing the descent down the roll corridor. If the lateral global position of the current sphere reaches the cylinder wall radius W for a value of φ_(c)′ in the interval (φ_(ci)′, φ_(cf)′), then the current sphere can reach the cylinder wall if it does not encounter another object first. In other words, if there is a solution of

X _(c) ² +Y _(c) ² =W ²  (103)

[0426] for φ_(c)′ in the interval (φ_(ci)′, φ_(cf)′), then the current sphere reaches the wall. Written explicitly, Eq. (103) has the form

A ₀ +A ₁ cos φ_(c) ′+A ₂ cos² φ_(c) ′+B ₁ sin φ_(c) ′+B ₂ sin² φ_(c)′=0  (104)

[0427] where

A ₀=(X _(i) ² +Y _(i) ² −W ²)/(a _(c) +a _(i))+sin θ_(ji) cos θ_(c)′[2X _(i) cos φ_(ji)+2Y _(i) sin φ_(ji)+(a _(c) +a _(i))sin θ_(ji) cos θ_(c)′]  (105a)

A ₁=−2 sin θ_(c)′ cos θ_(ji) [X _(i) cos φ_(ji) +Y _(i) sin φ_(ji)+(a _(c) +a _(i))sin θ_(ji) cos θ_(c)′]  (105)

A ₂=(a _(c) +a _(i))cos² θ_(ji) sin² θ_(c)′  (105c)

B ₁=2 sin θ_(c) ′[X _(i) sin φ_(ji) −Y _(i) cos φ_(ji)]  (105d)

B ₂=(a _(c) +a _(i))sin² θ_(c)′.  (105e)

[0428] Eq. (104) can be converted into a quartic equation in sin φ_(c)′ by changing the cos² φ_(c)′ term into 1−sin² φ_(c)′ and the cos φ_(c)′ term into +[1−sin² φ_(c)′]^(½). (The plus sign only is used only because φ_(c)′ cannot exceed ±π/2.) We then have

(A ₀ +A ₂)+B ₁ sin φ_(c)′+(B ₂ −A ₂)sin² φ_(c) ′=−A ₁[1−sin² φ_(c)′]{fraction (1/2)}.  (106)

[0429] Squaring both sides gives $\begin{matrix} {{{\left( {A_{2} - B_{2}} \right)^{2}\sin^{4}\phi_{c}^{\prime}} - {2{B_{1}\left( {A_{2} - B_{2}} \right)}\sin^{3}\phi_{c}^{\prime}} + {\left( {A_{1}^{2} - {2A_{0}A_{2}} - {2A_{2}^{2}} + B_{1}^{2} + {2A_{0}B_{2}} + {2A_{2}B_{2}}} \right)\sin^{2}\phi_{c}^{\prime}} + {2\left( {A_{0} + A_{2}} \right)B_{1}\sin \quad \phi_{c}^{\prime}} + {\left( {A_{0} - A_{1} + A_{2}} \right)\left( {A_{0} + A_{1} + A_{2}} \right)}} = 0} & (107) \end{matrix}$

[0430] If this equation has any real roots in the interval (φ_(ci)′, φ_(cf)′), then the smallest in magnitude of these that satisfies the original equation (104) is the point at which the roll corridor intersects the cylinder wall. The preferred implementation can check the roots in the original equation because squaring can give extraneous roots.

[0431] Hitting One or More Spheres Simultaneously

[0432] The preferred implementation has now defined a roll corridor in the primed coordinate system beginning at φ_(ci)′ and ending at φ_(cf)′. The end of the roll corridor is where the current sphere either lost contact with one or both of its contact spheres, when its south pole encountered either a catch net or a water level, or when its center encountered its cylinder wall. The preferred implementation can check all spheres that can intersect this roll corridor to find the sphere(s) encountered first as the current sphere descends along its roll corridor, i.e., as φ_(c)′ moves from φ_(ci)′ to φ_(cf)′.

[0433] The global position of the current sphere as a function of φ_(c)′ is given by Eqs. (77, 78, and 81). If some other pack spheres, say the k-th sphere is to intersect the roll corridor, then the following equation must have a solution in the range (θ_(ci)′, φ_(cf)′): $\begin{matrix} {{{{{\overset{\rho}{R}}_{c}\left( \phi_{c}^{\prime} \right)} - {\overset{\rho}{R}}_{k}}} = {a_{c} + {a_{k}.}}} & (108) \end{matrix}$

[0434] Squaring this equation gives $\begin{matrix} {{R_{c}^{2} - {2{{\overset{\rho}{R}}_{c} \cdot {\overset{\rho}{R}}_{k}}} + R_{k}^{2}} = \left( {a_{c} + a_{k}} \right)^{2}} & (109) \end{matrix}$

[0435] which becomes the following equation in φ_(c)′:

A cos φ_(c) ′+B sin φ_(c) ′=C  (110)

[0436] where

A=−X _(ik) cos φ_(ji) cos θ_(ji) sin θ_(c) ′−Y _(ik) cos θ_(ji) sin φ_(ji) sin θ_(c) ′+Z _(ik) sin θ_(c)′ sin θ_(ji)  (111)

B=X _(ik) sin φ_(ji) sin θ_(c) ′−Y _(ik) cos φ_(ji) sin θ_(c)′  (112) $\begin{matrix} {C = {{{- X_{ik}}\cos \quad \phi_{ji}\cos \quad \theta_{c}^{\prime}\sin \quad \theta_{ji}} - {Y_{ik}\cos \quad \theta_{c}^{\prime}\sin \quad \phi_{ji}\sin \quad \theta_{ji}} - {Z_{ik}\cos \quad \theta_{c}^{\prime}\cos \quad \theta_{ji}} + {\frac{{\left( {{2a_{c}} + a_{i} + a_{k}} \right)\left( {a_{k} - a_{i}} \right)} - R_{ik}^{2}}{2\left( {a_{c} + a_{i}} \right)}.}}} & \text{(113)} \end{matrix}$

[0437] The global coordinates of Sphere k relative to Sphere i are given by

X _(ik) =X _(i) −X _(k) , Y _(ik) =Y _(i) −Y _(k) , Z _(ik) =Z _(i) −Z _(k),  (114a)

[0438] and the square of the distance between the two sphere centers is

R _(ik) ² =X _(ik) ² +Y _(ik) ² +Z _(ik) ².  (114b)

[0439] The solution procedure of Eq. (110) is similar to that given in Section VII.D.7. The preferred implementation finds φ_(c)′ to be $\begin{matrix} {\phi_{c}^{\prime} = {\alpha \pm {\cos^{- 1}\frac{C}{\sqrt{A^{2} + B^{2}}}}}} & \text{(115a)} \end{matrix}$

[0440] where $\begin{matrix} {\alpha = {\tan^{- 1}{\frac{B}{A}.}}} & \text{(115b)} \end{matrix}$

[0441] If any of the φ_(c)′ solutions are outside the range [0,2π), units of 2π are added or subtracted until they are inside that range. Then if any solutions lie within (φ_(ci)′,φ_(cf)′), the smallest in magnitude of these is the position of first contact between the current sphere and Sphere k. If there is no solution, then Sphere k intersects no part of the roll corridor.

[0442] The preferred implementation has now performed an exact solution to find whether and where Sphere k intersects the current sphere's roll corridor. In most packs, the vast majority of the pack spheres are out of range of the roll corridor and so do not need the detailed calculations of Eqs. (115). There are a few much simpler checks that can be performed by the preferred implementation to immediately determine whether a pack sphere is out of range and so is not a contact candidate.

[0443] First, the roll corridor's highest global altitude is at φ_(ci)′ which, from Eq. (78) is found to be

Z _(c,max) =Z _(i)+(a _(c) +a _(i))(sin θ_(ji) sin θ_(c)′ cos φ_(ci)′+cos θ_(ji) cos θ_(c)′).  (116)

[0444] Therefore, the k-th pack sphere whose center lies a distance a_(c)+a_(k) above Z_(c,max) cannot overlap the roll corridor. Likewise, the lowest global altitude is at φ_(cf)′ and is given by

Z _(c,min) =Z _(i)+(a _(c) +a _(i))(sin θ_(ji) sin θ_(c)′ cos φ_(cf)′+cos θ_(ji) cos θ_(c)′).  (117)

[0445] The k-th pack sphere whose center lies a distance a_(c)+a_(k) below Z_(c,min) also cannot overlap the roll corridor. Therefore, the preferred implementation can immediately exclude from consideration all spheres whose global altitudes Z_(k) satisfy the following:

[0446] k-th sphere does not overlap if

Z _(k) ≧Z _(c,max) +a _(c) +a _(k)  (118a)

[0447] or

Z _(k) ≧Z _(c,min) −a _(c) −a _(k).  (118b)

[0448] Roll corridor extrema in the X and Y directions do not necessarily lie at the beginning and end of the roll corridor. Eqs. (81) give the global X and Y coordinates of the current sphere as a function of φ_(c)′. If we differentiate X_(c)(φ_(c)′) with respect to φ_(c)′ and set the derivative equal to zero, we have an equation whose solution gives us the extrema in X. If either of those extrema lie in (φ_(ci)′, φ_(cf)′), then that position is either the minimum or maximum X value the current sphere assumes as it descends the roll corridor. The same is true for the derivative of Y(φ_(c)′) with respect to φ_(c)′. The derivatives followed by the extrema solutions are $\begin{matrix} {\frac{X_{c}}{\phi_{c}^{\prime}} = {{\left( {a_{c} + a_{i}} \right)\left( {{\cos \quad \theta_{ji}\cos \quad \phi_{ji}\sin \quad \theta_{c}^{\prime}\sin \quad \phi_{c}^{\prime}} + {\sin \quad \phi_{ji}\sin \quad \theta_{c}^{\prime}\cos \quad \phi_{c}^{\prime}}} \right)} = 0}} & \text{(119)} \end{matrix}$

$\begin{matrix} {{\tan \quad \phi_{cx}^{\prime}} = {- \frac{\tan \quad \phi_{ji}}{\cos \quad \theta_{ji}}}} & \text{(120)} \end{matrix}$

[0449] for the two X extrema (the above equation has two solutions for φ_(cx)′), and $\begin{matrix} {\frac{Y_{c}}{\phi_{c}^{\prime}} = {{\left( {a_{c} + a_{i}} \right)\left( {{\cos \quad \theta_{ji}\sin \quad \phi_{ji}\sin \quad \theta_{c}^{\prime}\sin \quad \phi_{c}^{\prime}} - {\cos \quad \phi_{ji}\sin \quad \theta_{c}^{\prime}\cos \quad \phi_{c}^{\prime}}} \right)} = 0}} & \text{(121)} \end{matrix}$

$\begin{matrix} {{\tan \quad \phi_{cy}^{\prime}} = \frac{\cot \quad \phi_{ji}}{\cos \quad \theta_{ji}}} & \text{(122)} \end{matrix}$

[0450] for the two Y extrema.

[0451] Finally then, the X and Y extrema of the roll corridor in the global coordinates are

X _(c,min)=MIN[X _(c)(φ_(ci)′), X _(c)(φ_(cf)′), X _(c)(φ_(cx)′)]  (123a)

X _(c,max)=MAX[X _(c)(φ_(ci)′), X _(c)(φ_(cf)′), X _(c)(φ_(cx)′)]  (123b)

[0452] with the X_(c)(φ_(cx)′) omitted if neither φ_(cx)′ lies in (φ_(ci)′, φ_(cf)′). Similarly,

Y _(c,min)=MIN[Y _(c)(φ_(ci) 40 ), Y _(c)(φ_(cf)′), Y _(c)(φ_(cy)′)]  (124a)

Y _(c,max)=MAX[Y _(c)(φ_(ci)′), Y _(c)(φj_(cf)′), Y _(c)(φ_(cy)′)],  (124b)

[0453] again with the Y_(c)(φ_(cy)′) omitted if neither φ_(cy)′ lies in (φ_(ci)′, φ_(cf)′).

[0454] Then the k-th sphere cannot overlap the roll corridor if

X _(k) ≦X _(c,min) −a _(c) −a _(k)  (125a)

[0455] or

X _(k) ≧X _(c,max) +a _(c) +a _(k)  (125b)

[0456] or

Y _(k) ≧Y _(c,min) −a _(c) −a _(k)  (125c)

[0457] or

Y _(k) ≧Y _(c,max) +a _(c) +a _(k).  (125d)

[0458] Another discriminator that can be used by the preferred implementation to immediately exclude a large number of pack spheres from detailed examination is to consider whether the roll corridor is far enough from the central Z axis that it cannot overlap all the spheres within a given inner cylinder. To find this, the preferred implementation uses the closest radial approach P_(c,min) of the roll corridor to the central axis. The square of the radial distance [P_(c)(φ_(c)′)]² is given by

[P _(c)(φ_(c)′)]² =[X _(c)(φ_(c)′)]² +[Y _(c)(φ_(c)′)]²  (126)

[0459] where we obtain the explicit expression by substituting Eqs. (81) into Eq. (126):

[P _(c)(φ_(c)′)]² =[X _(i)+(a _(c) +a _(i))(−cos θ_(ji) cos φ_(ji) sin θ_(c)′ cos φ_(c)′+sin φ_(ji) sin θ_(c)′ sin _(φ) _(c)′+sin θ_(ji) cos φ_(ji) cos θ_(c)′)]²

+[Y _(i)+(a _(c) +a _(i))(−cos θ_(ji) sin φ_(ji) sin θ_(c)′ cos φ_(c)′−cos φ_(ji) sin θ_(c)′ sin φ_(c)′+sin θ_(ji) sin φ_(ji) cos θ_(c)′)]².  (127)

[0460] Setting the derivative of [P_(c)(φ_(c)′)]² with respect to φ_(c)′ equal to zero yields the equation whose solution φ_(cp)′ gives the closest approach of the roll corridor to the global Z axis: $\begin{matrix} {{\left\lbrack {X_{i} + {\left( {a_{c} + a_{i}} \right)\left( {{{- \cos}\quad \theta_{ji}\quad \cos \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \cos \quad \phi_{c}^{\prime}} + {\sin \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \sin \quad \phi_{c}^{\prime}} + {\sin \quad \theta_{ji}\quad \cos \quad \phi_{ji}\quad \cos \quad \theta_{c}^{\prime}}} \right)}} \right\rbrack \left( {{\cos \quad \theta_{ji}\quad \cos \quad \phi_{ji}\sin \quad \theta_{c}^{\prime}\quad \sin \quad \phi_{c}^{\prime}} + {\sin \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \cos \quad \phi_{c}^{\prime}}} \right)} + {\quad{{\left\lbrack {Y_{i} + {\left( {a_{c} + a_{i}} \right)\left( {{{- \cos}\quad \theta_{ji}\quad \sin \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \cos \quad \phi_{c}^{\prime}} - {\cos \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \sin \quad \phi_{c}^{\prime}} + {\sin \quad \theta_{ji}\quad \sin \quad \phi_{ji}\quad \cos \quad \theta_{c}^{\prime}}} \right)}} \right\rbrack \left( {{\cos \quad \theta_{ji}\quad \sin \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \sin \quad \phi_{c}^{\prime}} - {\cos \quad \phi_{ji}\quad \sin \quad \theta_{c}^{\prime}\quad \cos \quad \phi_{c}^{\prime}}} \right)} = 0.}}} & (128) \end{matrix}$

[0461] This equation is of the form

A ₀ +A ₁ cos φ_(c) ′+A ₂ cos² φ_(c) ′+B ₁ sin φ_(c) ′+B ₂ sin² φ_(c)′=0  (129)

[0462] where in this case, the coefficients are given by

A ₀ =X _(i) ² +Y _(i) ²+2(a _(c) +a _(i))cos θ_(c)′(X _(i) sin θ_(ji) cos φ_(ji) +Y _(i) sin θ_(ji) sin φ_(ji))+(a _(c) +a _(i))² cos² θ_(c)′ sin² θ_(ji)  (130a)

A ₁=−2(a _(c) +a _(i))cos θ_(ij) sin θ_(c) ′[X _(i) cos φ_(ji) +Y _(i) sin φ_(ji)+(a _(c) +a _(i))cos θ_(c)′ sin θ_(ji)]  (130b)

A ₂=(a _(c) +a _(i))² cos² θ_(ji) sin² θ_(c)′  (130c)

B ₁=2(a _(c) +a _(i))sin θ_(c)′{sin θ_(ji) [X _(i)+(a _(c) +a _(i))cos θ_(c)′ sin θ_(ij) cos φ_(ji)]−cos θ_(c) ′[Y _(i)+(a _(c) +a _(i))cos θ_(c)′ sin θ_(ji) sin φ_(ji)]}  (130d)

B ₂=(a _(c) +a _(i))² sin² θ_(c)′  (130e)

[0463] Eq. (129) can be converted into a quartic equation by changing the cosines into sines in the same fashion as led up to Eq. (107): $\begin{matrix} {{{\left( {A_{2} - B_{2}} \right)^{2}\sin^{4}\phi_{c}^{\prime}} - {2{B_{1}\left( {A_{2} - B_{2}} \right)}\sin^{3}\phi_{c}^{\prime}} + {\left( {A_{1}^{2} - {2A_{0}A_{2}} - {2A_{2}^{2}} + B_{1}^{2} + {2A_{0}B_{2}} + {2A_{2}B_{2}}} \right)\sin^{2}\phi_{c}^{\prime}} + {2\left( {A_{0} + A_{2}} \right)B_{1}\sin \quad \phi_{c}^{\prime}} + {\left( {A_{0} - A_{1} + A_{2}} \right)\left( {A_{0} + A_{1} + A_{2}} \right)}} = 0.} & (131) \end{matrix}$

[0464] There are four sin φ_(c)′ solutions to this quartic equation and for a given sin φ_(c)′, there are two φ_(c)′ solutions. Complex solutions and real solutions lying outside [−1,1] are immediately discarded in the preferred implementation. Furthermore, we are only interested in those solutions with the same sign as sin φ_(ci)′ and that lie in (φ_(ci)′, φ_(cf)′) because that is the direction the current sphere will roll. The preferred implementation checks any remaining solution φ_(cp)′ by ensuring it satisfies the original equation (129). If there is no solution in [φ_(ci)′, φ_(cf)′], then one or the other of the end points is the closest approach to the global Z axis and both must be substituted into Eq. (127) to find the smaller P_(c).

[0465] Once the P_(c,min) of closest approach is found, the preferred implementation checks to see if there are any mode's cylinder radii W_(k) that lie completely inside P_(c,min) by more than the sum of the mode sphere's radius plus the current sphere's radius. If

P _(c) ≧W _(k) +a _(l) +a _(c)  (132)

[0466] then none of the Mode k particles can touch the current sphere as it descends its current roll corridor and so may immediately be excluded as candidates for contact.

[0467] All spheres whose north poles have sunk beneath the catch net or water level are not candidates for contact with the current sphere. The preferred implementation continually or periodically monitors the lowest index number of the sphere whose north pole is still above the catch net so that we waste no time looking at spheres with lower index numbers as candidates for contact.

[0468] Touching One Sphere and the Cylinder Wall

[0469] Remember that in the preferred implementation it is the center of the current sphere constrained by the cylinder wall, not its edge. When in stable contact with both a pack sphere and the cylinder wall, the roll corridor lies on the wall and descends toward the equatorial plane of the contacted pack sphere. If the contacted sphere (denote it Sphere i) is as large as the cylinder, then the current sphere moves toward the lowest point on a roll corridor that spans the entire 2π radians of the cylinder.

[0470] The roll corridor will be denoted by the global azimuthal position Φ_(c). Its initial position is given b

Φ_(c0)=tan⁻¹(Y _(c) /X _(c)).  (133)

[0471] The preferred implementation uses the range [0,2π) rather than (−π,π] for the range of the global azimuthal position. The global azimuthal position of the Sphere i is

Φ_(i)=tan⁻¹(Y _(i) /X _(i))  (134)

[0472] which also lies in [0,2π). If Φ_(c0)>Φ_(i), the current sphere rolls toward higher Φ. If Φ_(c0)<Φ_(i), it rolls toward lower Φ. In the unlikely event that Φ_(c0)=Φ_(i), the random number generator chooses a roll direction.

[0473] If it encounters nothing else, the current sphere will roll until it reaches:

[0474] 1. the equatorial plane of Sphere i where it will fall away from Sphere i; or

[0475] 2. the lowest azimuthal point in its cylinder permitted by Sphere i.

[0476] The azimuthal position at which it will reach the equatorial plane of Sphere i is found by the law of cosines as

Φ_(cf)=Φ_(i)±ΔΦ_(c)  (135)

[0477] where $\begin{matrix} {{\Delta\Phi}_{c} = {{\cos^{- 1}\left( \frac{W_{c}^{2} + P_{i}^{2} - \left( {a_{c} + a_{i}} \right)^{2}}{2W_{c}P_{i}} \right)}.}} & (136) \end{matrix}$

[0478] In this expression, W_(c) is the radius of the cylinder wall, P_(i)={square root}{square root over (X_(i) ²+Y_(i) ²)} is the radial position of Sphere i from the global Z axis, and a_(c) and a_(i) are the radii of the current sphere and Sphere i, respectively. The plus sign is used in Eq. (135) if the current sphere is rolling toward increasing Φ, the minus sign if toward decreasing Φ. If the absolute value of the quantity in the parentheses of Eq. (136) is greater than unity, then there is no solution and the current sphere simply rolls around the perimeter of the cylinder until it reaches the lowest point it can. This lowest point is opposite the azimuthal position of Sphere i. Hence if $\begin{matrix} {{\frac{W_{c}^{2} + P_{i}^{2} - \left( {a_{c} + a_{i}} \right)^{2}}{2W_{c}P_{i}}} > 1} & (137) \end{matrix}$

[0479] then

ΔΦ_(c)=±π.  (138)

[0480] In the unlikely event that P_(i)=0, i.e., Sphere i is centered on the global Z axis, then there is no downward direction. The roll corridor is horizontal and the current sphere is placed where it is.

[0481] In this analysis, if the addition or subtraction of ΔΦ_(c) causes Φ_(cf) to lie outside [0,2π), then units of 2π are added or subtracted until Φ_(cf) again lies in [0,2π).

[0482] The preferred implementation also determines what placed pack spheres might intersect the roll corridor in the range (Φ_(c0), Φ_(cf)).

[0483] The current sphere will impact a placed pack sphere, say the j-th sphere, if there is a solution to $\begin{matrix} {{{{{\overset{\rho}{R}}_{c}\left( \Phi_{c} \right)} - {\overset{\rho}{R}}_{j}}} = {a_{c} + a_{j}}} & (139) \end{matrix}$

[0484] anywhere in the range (Φ_(c0), Φ_(cf)). The Cartesian components of the vector $\begin{matrix} {{{{\overset{\rho}{R}}_{c}\left( \Phi_{c} \right)} = {\left( {X_{c},Y_{c},Z_{c}} \right)\quad {are}\quad {given}\quad {by}}}{{X_{c}\left( \Phi_{c} \right)} = {W_{c}\quad \cos \quad \Phi_{c}}}} & (140) \end{matrix}$

 Y _(c)(Φ_(c))=W _(c) sin Φ_(c)  (141)

[0485] The Z_(c) component can be found by inserting the X_(c) and Y_(c) component into the condition $\begin{matrix} {{{{\overset{\rho}{R}}_{c} - {\overset{\rho}{R}}_{i}}} = {a_{c} + {a_{i}.}}} & (142) \end{matrix}$

[0486] Squaring both sides, we obtain

W _(c) ² +Z _(c) ² +R _(i) ²−2W _(c)(X _(i) cos Φ_(c) +Y _(i) sin Φ_(c))−2Z _(i) Z _(c)=(a _(c) +a _(i))²  (143)

[0487] which is quadratic in Z_(c). One of the solutions is when the current sphere is above Sphere i and the other when it is below. In the preferred implementation, we are only interested in the solution above Sphere i, which is

Z _(c)(Φ_(c))=Z _(i) +[Z _(i) ²+(a _(c) +a _(i))² −W _(c) ² −R _(i) ²+2W _(c)(X _(i) cos Φ_(c) +Y _(i) sin Φ_(c))]^(½).  (144)

[0488] Now, inserting Eqs (140, 141, 144), in Eq. (139), we obtain an equation to solve for the Φ_(c) at which the current sphere contacts the j-th pack sphere:

A ₀ +A ₁ cos Φ_(c) +B ₁ sin Φ_(c)+(A ₂ cos Φ_(c) +B ₂ sin φ_(c))²=0  (145)

[0489] where the coefficients are given by

A ₀ =G ²−4(Z _(i) −Z _(j))² [Z _(i) ² −W _(c) ² −R _(i) ²+(a _(c) +a _(i))²]  (146a)

A ₁=4GW _(c)(X _(i) −X _(j))−8(Z _(i) −Z _(j))² W _(c) X _(i)  (146b)

A ₂=2W _(c)(X _(i) −X _(j))  (146c)

B ₁=4GW _(c)(Y _(i) −Y _(j))−8(Z _(i) −Z _(j))² W _(c) Y _(i)  (146d)

B ₂=2W _(c)(Y _(i) −Y _(j))  (146e)

[0490] and G is given by

G=(a _(i) −a _(j))(2a _(c) +a _(i) +a _(j))−R _(i) ² +R _(j) ²+2Z _(i) ²−2Z _(i) Z _(j).  (147)

[0491] Eq. (145) can be converted into a quartic polynomial in cos Φ_(c): $\begin{matrix} {{{\left( {A_{2}^{2} + B_{2}^{2}} \right)^{2}\cos^{4}\Phi_{c}} + {2\left( {{A_{1}A_{2}^{2}} + {2A_{2}B_{1}B_{2}} - {A_{1}B_{2}^{2}}} \right)\cos^{3}\Phi_{c}} + {\left( {A_{1}^{2} + {2A_{0}A_{2}^{2}} + B_{1}^{2} - {2A_{0}B_{2}^{2}} - {2A_{2}^{2}B_{2}^{2}} - {2B_{2}^{4}}} \right)\cos^{2}\Phi_{c}} + {2\left( {{A_{0}A_{1}} - {2A_{2}B_{1}B_{2}} + {A_{1}B_{2}^{2}}} \right)\cos \quad \Phi_{c}} + {\left( {A_{0} - B_{1} + B_{2}^{2}} \right)\left( {A_{0} + B_{1} + B_{2}^{2}} \right)}} = 0} & (148) \end{matrix}$

[0492] whose solutions are candidates for contact of the j-th pack sphere. The preferred implementation uses this expression as part of its determination. There are four solutions of the quartic equation and each cos Φ_(c) solution has two Φ_(c) solutions—eight in all. Of the four quartic solutions, the preferred implementation can eliminate complex solutions or solutions whose magnitude is greater than unity. Of the remaining solutions, if there are any that satisfy the original equation (145) and that lie in the range of the roll corridor (Φ_(c0), Φ_(cf)), they are contact points. Of the contact point(s), the value of Φ_(c) that lies closest to Φ_(c0) is the point at which the current sphere touches the j-th sphere. We will denote that point by Φ_(cj). If there are no solutions that satisfy the above conditions, the current sphere cannot contact the j-th sphere.

[0493] As the preferred implementation checks the candidate spheres in the pack for contact with the current sphere, that sphere with Φ_(cj) closest to Φ_(c0), if any, is the next sphere contacted. In the unlikely case that two or more pack spheres have the same Φ_(cj), then it checks the stability of each trio of contacts to see if the current sphere is to be placed there. If it is not stable, then the stability routine determines which sphere(s) the current sphere will roll away from.

[0494] As an efficiency measure, the preferred implementation can eliminate from consideration any modes or categories that are sufficiently far inside the cylinder wall of the current sphere that they cannot touch it. All mode k spheres are out of range if

W _(k) +a _(k) ≦W _(c) −a _(c).  (149)

[0495] Any other sphere j is a candidate for being in range only if

W _(c) −a _(c) −a _(j) <P _(j) <W _(c) +a _(c) +a _(j)  (150)

[0496] where P_(j) is the global radial distance of Sphere j from the Z axis.

[0497] The Subroutine UPDATE

[0498] The UPDATE subroutine of the preferred implementation updates all parameters and arrays that change as a result of the placement of the current particle. These changes include the following.

[0499] 1. The Pool Switch

[0500] If the pool switch is true, then the placement of the current particle means the bin from which it was chosen should be diminished by one. This adjustment is performed in Subroutine UPDATE.

[0501] 2. The Catch Net

[0502] The catch net belonging to the mode, submode or category current sphere also generally ratchets upward. The prescription for determining how much it ascends will now be addressed.

[0503] A sense of pack surface must be established. With a variety of particles being dropped into a variety of cylinders, the pack surface must be defined. This can be done in a number of ways, as noted above. For purposes of the preferred implementation, let us consider the altitude of the south poles of the last m placed spheres of any and all modes. As explained above, the average of those altitudes is defined for present purposes as the pack “surface”: $\begin{matrix} {Z_{surface} = {\frac{1}{m}{\sum\limits_{j = 1}^{m}\left( {Z_{j} - a_{j}} \right)}}} & \text{VII.E.2(1)} \end{matrix}$

[0504] where m is the number of most recently placed pack sphere equatorial cross-sections that would just cover the outermost cylinder n with cross-sectional area πW_(n) ². The value for m is found from the inequality $\begin{matrix} {{\sum\limits_{j = 1}^{m - 1}a_{j}^{2}} < W_{n}^{2} \leq {\sum\limits_{j = 1}^{m}{a_{j}^{2}.}}} & \text{VII.E.2(2)} \end{matrix}$

[0505] If the size of the last placed set of spheres is very large so that m is very small, then we have a minimum required value for m which can be user-defined but for which the default value in this implementation is m_(min)=12. Only when the pack is just starting so that 12 particles have not yet been dropped is m smaller for this implementation. Pre-placed particles do not count in assessing the pack “surface.”

[0506] The k-th mode catch net is then defined as

Z _(net)(k)=Z _(surface) −γa _(k)  VII.E.2(3)

[0507] where γ is the number of k-th mode radii beneath the surface that the k-th mode catch net lies. Here it is a user-defined number which has a default of γ=2.

[0508] Subroutine UPDATE readjusts all the above parameters so that the catch net for every mode has a proper value after the current sphere is placed.

[0509] When the pack is still small enough that an insufficient number of particles have been placed to satisfactorily define a surface, the catch net may be ratcheted up a little after the placement of each particle so that the particles on the bottom of the cylinders do not all have the same altitude. If the switch ROUGHNET is true, then the current sphere's catch net moves upward by a small random amount

ra_(min)/N_(cs)  VII.E.2(4)

[0510] where r is a uniformly generated random number in [0,1] and N_(cs) is the total number of sphere cross sections required to cover all the cylinders: $\begin{matrix} {N_{cs} = {\sum\limits_{k = 1}^{n}\frac{W_{k}^{2} - W_{k - 1}^{2}}{a_{k}^{2}}}} & \text{VII.E.2(5)} \end{matrix}$

[0511] where n is the number of modes, W_(k) is the cylinder wall of the k-th mode, and W₀≡0. If ROUGHNET is false, then the catch net stays where it is until enough particles have been defined to make a surface and until the surface is more than Z_(surface)−γa_(k) above the starting place.

[0512] The starting place for the k-th mode catch net is Z_(init)−a_(k). A k-th sphere radius is subtracted from the overall pack starting altitude Z_(init) because the catch net stops south poles and Z_(init) is the starting place for sphere centers. The default for Z_(init) is zero in this implementation.

[0513] The Water Levels

[0514] The water level also is modified when the current sphere is placed according to the preferred implementation. Recall that the water level only exists beyond the innermost cylinder. Its altitude tracks the pack surface and is at a user-specified distance β in terms of the smallest sphere radius a_(min) beneath the surface defined by Eqs. VII.E.2(1) and (2). The default for β is unity. Hence

Z _(w) =Z _(surface) −βa _(min).  VII.E.3(1)

[0515] If β is negative, the water level lies above the pack surface.

[0516] The smallest cylinder in this implementation has no water level, only a catch net. It does not need a water level because water levels are designed to simulate the surface of the innermost cylinder and the innermost cylinder has its own particle surface potentially containing all the particles of the pack.

[0517] Current Sphere History Parameters

[0518] The preferred implementation uses are parameters that monitor the number of times the current sphere tunneled, the number of distinct roll corridors it underwent (not counting free-fall drops), and the number of free-fall drops it underwent. All these are reset to zero in this implementation.

[0519] The arrays indicating which pack spheres the current sphere is touching and which spheres it just rolled away from are also zeroed out along with the total number of such spheres.

[0520] The array keeping track of the lowest index number above catch net for each mode is adjusted if necessary.

[0521] The array monitoring the index numbers of all pack spheres with exposed north poles also is updated if the current sphere covered one or more exposed north poles.

[0522] In addition, the pack sphere position arrays have the current sphere's (X,Y,Z) position added to them along with the array specifying its mode number. The counter monitoring the total number of spheres placed so far in the pack is also incremented by one.

[0523] The Subroutine OUTSTAT

[0524] There are a number of important pack statistics and features that the user may need or want to calculate. In this implementation, subroutine OUTSTAT calculates the output statistics that the user specifies. These output statistics include:

[0525] A. The volume fraction of the pack.

[0526] B. The radial distribution functions g_(ij)(r)dr which is the mean number of Mode j particle centers that lie between r and r+dr from a Mode i particle center.

[0527] C. Coordination numbers Ω_(ij) which represent the mean number of Mode j particles touching a Mode i particle.

[0528] D. Detailed pack statistics for each particle mode such as that mode's minimum and maximum positions, number of its particles in the pack, radial and axial density functions for each requested mode, as well as other information.

[0529] Each of these output data will now be addressed.

[0530] Finding the Volume Fraction

[0531] To determine the packing fraction, the program finds the total volume of the innermost cylinder occupied by spheres. Recall that the cylinder walls are boundaries to the centers of the spheres, not their edges. Hence, many spheres will be overlapping the cylinder walls. The preferred implementation has a general expression for determining how much volume of a sphere of radius a_(s) located at position (x_(s), y_(s), z_(s)) lies inside a cylinder which is concentric to the z axis with radius a_(c), bottom cylinder altitude z_(b) and top cylinder altitude z_(t). The sphere volume inside the cylinder will be denoted V_(in). Here the sphere and cylinder geometric parameters have no restrictions except:

a_(s)>0, a_(c)>0, and z_(t)>z_(b).  VIII.A.(1)

[0532] The radial distance of the sphere center from the z axis is defined here by

ρ_(s) =[x _(s) ² +y _(s) ²]^(½).  VIII.A.(2)

[0533] There are four possible cases for this overlap problem. In Case 1, the sphere is completely outside the cylinder so V_(in)=0. In Case 2, the sphere is completely inside the cylinder so V_(in)=(4/3)πa_(s) ³. In Case 3, the cylinder is completely inside the sphere so V_(in)=πa_(c) ²(z_(t)−z_(b)). In Case 4, the sphere and cylinder intersect each other and the expression for V_(in) is more complex. In the preferred implementation, processing is performed to identify and address these cases using the following approach.

[0534] Case 1: Sphere Completely Outside Cylinder

[0535] The sphere is completely outside the cylinder

V_(in)=0  VIII.A.1(1)

[0536] only if one of the following conditions are met:

[0537] If the sphere's north pole is lower than the cylinder bottom . . .

z _(s) +a _(s) ≦z _(b)  VIII.A.1(1a)

[0538] Or if the sphere's south pole is above the cylinder top . . .

z _(s) a _(s) ≧z _(t)  VIII.A.1(1b)

[0539] Or if the sphere is more than its radius away from the cylinder side . . .

ρ_(s) −a _(s) ≧a _(c)  VIII.A.1(1c)

[0540] Or if the sphere center is above the cylinder top and is more than its radius away from the upper cylinder edge . . .

(ρ_(s) −a _(c))²+(z _(s) −z _(t))² ≧a _(s) ² and z_(s)>z_(t)  VIII.A.1(1d)

[0541] Or if the sphere center is below the cylinder bottom and is more than its radius away from the lower cylinder edge . . .

(ρ_(s) −a _(c))²+(z _(b) −z _(s))² ≧a _(s) ² and z_(s)<z_(b).  VIII.A.1(1e)

[0542] Case 2: Sphere Completely Inside Cylinder

[0543] The sphere is completely inside the cylinder

V _(in)=(4/3)πa _(s) ³  VIII.A.2(1)

[0544] only if all three of the following conditions are simultaneously met:

[0545] If the sphere's north pole is no higher than the cylinder top . . .

z _(s) +a _(s) ≦z _(t)  VIII.A.2(1a)

[0546] And if the sphere's south pole is no lower than the cylinder bottom . . .

z _(s) −a _(s) ≧z _(b)  VIII.A.2(1b)

[0547] And if the sphere's equator nowhere exceeds the cylinder radius . . .

ρ_(s) +a _(s) ≦a _(c).  VIII.A.2(1c)

[0548] Case 3: Cylinder Completely Inside Sphere

[0549] The cylinder is completely inside the sphere

V _(in) =πa _(c) ²(z _(t) −z _(b))  VIII.A.3(1)

[0550] if both the following two conditions are met:

[0551] If the upper edge of the cylinder is inside the sphere . . .

(ρ_(s) +a _(c))²+(z _(t) −z _(s))² ≦a _(s) ²  VIII.A.3(1a)

[0552] And if the lower edge of the cylinder is inside the sphere . . .

(ρ_(s) +a _(c))²+(z _(s) −z _(b))² ≦a _(s) ².  VIII.A.3(1b)

[0553] Case 4: Cylinder and Sphere Intersect

[0554] There are several subsets of Case 4. To efficiently organize them, we define two circles: the sphere circle and the cylinder circle. The sphere circle is the perimeter of the sphere's cross section at a given z altitude. Its radius is

r _(s) =[a _(s) ²−(z−z _(s))²]^(½) , z _(s) −a _(s) ≦z≦z _(s) +a _(s)  VIII.A.4(1)

[0555] and its radial position ρ_(s) is given by Eq. VIII.A(2). Likewise the cylinder circle is the perimeter of the cylinder's cross section which has constant radius a_(c) at any z altitude between Z_(b) and z_(t) and is centered on the z axis.

[0556] To describe the intersection of sphere and cylinder, four subcases for the relationship of the sphere circle and the cylinder circle at a particular altitude z are defined:

[0557] Subcase 4.1: The two circles do not overlap or one or both are nonexistent.

[0558] Subcase 4.2: The sphere circle is completely enclosed in the cylinder circle.

[0559] Subcase 4.3: The cylinder circle is completely enclosed in the sphere circle.

[0560] Subcase 4.4: The two circles intersect.

[0561] To find V_(in), the preferred implementation integrates in z the overlap areas of the two circles A_(in) from the altitude where one subcase holds to the altitude where another subcase holds.

For Subcase 4.1, A_(in)=0.  VIII.A.4(2a)

For Subcase 4.2, A_(in)=πa_(s) ².  VIII.A.4(2b)

For Subcase 4.3, A_(in)=πa_(c) ².  VIII.A.4(2c)

For Subcase 4.4, A_(in)=a_(c) ²(α−cos α sin α)+r_(s) ²(β−cos β sin β)  VIII.A.4(2d)

[0562] where r_(s) is given by Eq. VIII.A.4(1) and $\begin{matrix} {{\cos \quad \alpha} = \frac{\rho_{s}^{2} + a_{c}^{2} - r_{s}^{2}}{2\rho_{s}a_{c}}} & \text{VIII.A.4(3a)} \\ {{\sin \quad \alpha} = \frac{\sqrt{\left\lbrack {r_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} - r_{s}^{2}} \right\rbrack}}{2\rho_{s}a_{c}}} & \text{VIII.A.4(3b)} \\ {{\cos \quad \beta} = \frac{\rho_{s}^{2} + r_{s}^{2} - a_{c}^{2}}{2\rho_{s}r_{s}}} & \text{VIII.A.4(4a)} \\ {{\sin \quad \beta} = {\frac{\sqrt{\left\lbrack {r_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} - r_{s}^{2}} \right\rbrack}}{2\rho_{s}r_{s}}.}} & \text{VIII.A.4(4b)} \end{matrix}$

[0563] The implementation now constructs a series of altitudes at which the cylinder circle and the sphere circle change from one subcase to another in Case 4.

[0564] A sphere and a cylinder side can intersect each other at either 0, 2, or 4 altitudes. Pairs of altitudes may be degenerate (two solutions having the same altitude) if the sphere just nicks the cylinder wall. The preferred implementation determines these altitudes using the following equation:

[r _(s)(z)]² =[a _(c)±ρ_(s)]²  VIII.A.4(5a)

[0565] or

a _(s) ²−(z−z _(s))² =[a _(c)±ρ_(s)]²  VIII.A.4(5b)

[0566] which, using Eq. (9), has the four solutions $\begin{matrix} {z = {z_{s} \pm {\sqrt{a_{s}^{2} - \left( {a_{c} \pm \rho_{s}} \right)^{2}}.}}} & {{{VIII}.A}{.4}(6)} \end{matrix}$

[0567] The + sign in the first ± of Eq. VIII.A.4(6) denotes the upper or northern hemisphere intersection altitude; the − sign denotes the lower or southern hemisphere intersection altitude. The + sign in the second ± of Eq. VIII.A.4(6) denotes intersection with the far cylinder wall, on the opposite side of the z axis from the sphere's side; the − sign denotes intersection with the near cylinder wall, on the same side of the z axis as the sphere.

[0568] Armed with these four solutions, the implementation can effectively address each of the four subcases of Case 4. In this illustrative implementation, it separately addresses whether the sphere circle lies in the southern hemisphere of the sphere or whether it is the equatorial plane or in the northern hemisphere. The four subcases are considered separately for the two hemispheres making eight situations in all. The hemispheres are considered separately because if the sphere circle is in the southern hemisphere, it is increasing in size as z increases. Hence the altitude at which we will change subcases can be determined. If the sphere circle is the equatorial plane or in the northern hemisphere, it is decreasing in size as z increases and again the altitude at which subcases will change can be determined.

[0569] Finding Upper and Lower Boundaries of Subcases for Case 4

[0570] The logic used in the preferred implementation to find the altitudes at which subcases change will now be discribed. Let z_(low) be the lower altitude of the subcase currently being examined and z_(high) be its upper altitude. The function r_(s)(z) is given in Eq. VIII.A.4(1).

[0571] Initially, let z_(low)=z_(b), the bottom of the cylinder. After each DO WHILE cycle, z_(low) is set to the previous cycle's z_(high) and a new z_(high) is sought. To illustrate using pseudocode expression: V_(in) = 0 ! Initialize V_(in) to zero. z_(low) = z_(b) ! Initialize z_(low) to the bottom of the cylinder. keepGoing = TRUE ! Do Loop flag. DO WHILE (keepGoing) IF (z_(s) > z_(low)) THEN ! Southern hemisphere subcases IF (ρ_(s) − r_(s)(z_(low)) > α_(c)) THEN ! Subcase 4.1 $z_{high} = {z_{s} - \sqrt{a_{s}^{2} - \left( {a_{c} - \rho_{c}} \right)^{2}}}$

IF (z_(high) ≧ z_(t)) keepGoing = FALSE (There is no addition to V_(in) in this subcase.) ELSE IF (ρ_(s) + r_(s)(z_(low)) < α_(c)) THEN ! Subcase 4.2 $z_{high} = {{MIN}\left\lbrack {{z_{s} - \sqrt{a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}}},z_{t},{z_{s} + \alpha_{s}}} \right\rbrack}$

V_(in) = V_(in) + π(z_(high) − z_(low))]α_(s) ² − z_(s) ² + z_(s)(z_(high) + z_(low)) − (z_(high) ² +z_(high)z_(low) + z_(low) ²)/3] IF (z_(high) = z_(t) OR Z_(high) = z_(s) + α_(s)) keepGoing = FALSE ELSE IF (r_(s)(z_(low)) − ρ_(s) ≧ α_(c)) THEN ! Subcase 4.3 $z_{high} = {{MIN}\left\lbrack {{z_{s} + \sqrt{a_{s}^{2} - \left( {a_{c} + \rho_{s}} \right)^{2}}},z_{t}} \right\rbrack}$

V_(in) = V_(in) + πα_(c) ²(z_(high) − z_(low)) IF (z_(high) = z_(t)) keepGoing = FALSE ELSE IF ((r_(s)(z_(low)) > ρ_(s) AND r_(s)(z_(low)) − ρ_(s) < α_(c) AND α_(c) ≦ r_(s)(z_(low)) + ρ_(s)) OR (ρ_(s) ≧ r_(s)(z_(low)) AND ρ_(s) − r_(s)(z_(low)) ≦ α_(c) AND α_(c) ≦ρ_(s) + r_(s)(z_(low)))) THEN ! Subcase 4.4 IF (α_(s) > α_(c) + ρ_(s)) THEN $z_{high} = {{MIN}\left\lbrack {{z_{s} - \sqrt{a_{s}^{2} - \left( {a_{c} + \rho_{s}} \right)^{2}}},z_{t}} \right\rbrack}$

V_(in) = V_(in) + ∫_(z_(low))^(z_(high))z  A_(in) = V_(in) + Δ  V₁  VIII.A.4(7)

where ΔV₁ is given in the next section below. IF (z_(high) = z_(t)) keepGoing = FALSE ELSE $z_{high} = {{MIN}\left\lbrack {{z_{s} + \sqrt{a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}}},z_{t}} \right\rbrack}$

V_(in) = V_(in) + ∫_(z_(low))^(z_(high))z  A_(in) = V_(in) + Δ  V₂  VIII.A.4(8)

where ΔV₂ is given in the next section below. END IF ! End two Subcase 4.4 situations END IF ! End Subcase 4.4 ELSE ! Equatorial plane & northern hemisphere subcases IF (ρ_(s) − r_(s)(z_(low)) ≧ α_(c)) THEN ! Subcase 4.1 keepGoing p32p 9 FALSE (Because the sphere circle is shringking away from the cylinder circle, there is no chance for additional overlap.) ELSE IF (ρ_(s) + r_(s)(z_(low)) ≦ α_(c)) THEN ! Subcase 4.2 z_(high) = MIN]z_(t), z_(s) + α_(s)] V_(in) = V_(in) + π(z_(high) − z_(low))[α_(s) ² − z_(s) ² + z_(s)(z_(high) + z_(low)) − (z_(high) ² + z_(high)z_(low) + z_(low) ²)/3] keepGoing = FALSE ELSE IF (r_(s)(z_(low)) − π_(s) < α_(c)) THEN ! Subcase 4.3 $z_{high} = {{MIN}\left\lbrack {{z_{s} + \sqrt{a_{s}^{2} - \left( {a_{c} + \rho_{s}} \right)^{2}}},z_{t}} \right\rbrack}$

V_(in) = V_(in) + ρα_(c) ²(z_(high) − z_(low)) IF (z_(high) = z_(t)) keepGoing = FALSE ELSE IF ((r_(s)(z_(low)) > ρ_(s) AND r_(s)(z_(low)) − ρ_(s) ≦ α_(c) AND α_(c) < r_(s)(z_(low)) + ρ_(s)) OR (ρ_(s) ≧ r_(s)(z_(low)) AND ρ_(s − r) _(s)(z_(low)) > α_(c) AND α_(c) > ρ_(s) + r_(s)(z_(low)))) THEN ! Subcase 4.4 $z_{high} = {{MIN}\left\lbrack {{z_{s} + \sqrt{a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}}},z_{t}} \right\rbrack}$

IF (α_(s) < α_(c) + ρ_(s)) THEN V_(in) = V_(in) + ∫_(z_(low))^(z_(high))z  A_(in) = V_(in) + Δ  V₃  VIII.A.4(9)

where ΔV₃ is given in the next section below. ELSE V_(in) = V_(in) + ∫_(z_(low))^(z_(high))z  A_(in) = V_(in) + Δ  V₄  VIII.A.4(10)

where ΔV₄ is given in the next section below END IF IF (z_(high) = z_(t)) keepGoing = FALSE END IF ! End Subcase 4.4 END IF ! End Subcases END IF ! End hemisphere IF's z_(low) = z_(high) ! Prepare for next z interval END DO ! End DO WHILE loop

[0572] Evaluation of the Integral ∫_(z_(low))^(z_(high))  z  A_(in)

[0573] We now address the integral $\begin{matrix} {\int_{z_{low}}^{z_{high}}\quad {{z}\quad A_{in}}} & \text{VIII.A.4(11)} \end{matrix}$

[0574] where A_(in) is given by Eqs. VIII.A.4(2d, 3, and 4) as $\begin{matrix} \begin{matrix} {A_{in} = \quad {{a_{c}^{2}{\cos^{- 1}\left( \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \zeta^{2}}{2\quad \rho_{s}a_{c}} \right)}} +}} \\ {\quad {{\left( {a_{s}^{2} - \zeta^{2}} \right){\cos^{- 1}\left( \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \zeta^{2}}{2\quad \rho_{s}\sqrt{a_{s}^{2} - \zeta^{2}}} \right)}} -}} \\ {\quad {\frac{1}{2}\sqrt{\left\lbrack {\zeta^{2} + \left( {\rho_{s} + a_{c}} \right)^{2} - a_{s}^{2}} \right\rbrack \left\lbrack {a_{s}^{2} - \left( {\rho_{s} - a_{c}} \right)^{2} - \zeta^{2}} \right\rbrack}}} \end{matrix} & \text{VIII.A.4(12)} \end{matrix}$

[0575] with

ζ=z−z _(s).  VIII.A.4(13)

[0576] This integral will involve elliptic integrals of the first, second, and third kinds which for present purposes are defined as in Abramowitz and Stegun. The incomplete elliptic integral of the first kind is given by $\begin{matrix} {{F\left( {\phi,k} \right)} \equiv {\int_{0}^{\phi}\quad {{\theta}\quad {\frac{1}{\sqrt{1 - {k^{2}\quad \sin^{2}\quad \theta}}}.}}}} & \text{VIII.A.4(14)} \end{matrix}$

[0577] The complete elliptic integral of the first kind is denoted by K(k) and is equal to F(π/2,k). Similarly, the incomplete elliptic integral of the second kind is given by $\begin{matrix} {{E\left( {\phi,k} \right)} \equiv {\int_{0}^{\phi}{{\theta}{\sqrt{1 - {k^{2}\sin^{2}\theta}}.}}}} & \text{VIII.A.4(15)} \end{matrix}$

[0578] with the complete elliptic integral of the second kind denoted by E(k) and equal to E(π/2,k). Finally, the incomplete elliptic integral of the third kind is given by $\begin{matrix} {{{\prod\left( {\phi,n,k} \right)} \equiv {\int_{0}^{\phi}{{\theta}\quad {\frac{1}{\left( {1 - {n\quad \sin^{2}\theta}} \right)\sqrt{1 - {k^{2}\sin^{2}\theta}}}.}}}}\quad} & \text{VIII.A.4(16)} \end{matrix}$

[0579] with the complete elliptic integral of the third kind denoted by Π(n,k) and equal to Π(π/2,n,k). Various efficient routines for the evaluation of these special functions can be found in the literature.

[0580] Focusing on the integral of each of the three terms in Eq. VIII.A.4(12), it is possible to perform an integration by parts of the first term of Eq. VIII.A.4(12) to dispatch the inverse cosine term. $\begin{matrix} {{a_{c}^{2}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{{\zeta cos}^{- 1}\left( \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \zeta^{2}}{2\rho_{s}a_{c}} \right)}}}} = {{a_{c}^{2}{{\zeta cos}^{- 1}\left( \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \zeta^{2}}{2\rho_{s}a_{c}} \right)}}_{\zeta_{1}}^{\zeta_{2}}{{+ 2}a_{c}^{2}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{\zeta^{2}}{R^{1/2}}}}}}} & {{{VIII}.A}{.4}(17)} \end{matrix}$

[0581] where $\begin{matrix} {R^{1/2} = {\sqrt{\left\lbrack {a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2} - \zeta^{2}} \right\rbrack \left\lbrack {\zeta^{2} + \left( {a_{c} + \rho_{s}} \right)^{2} - a_{s}^{2}} \right\rbrack}.}} & {{{VIII}.A}{.4}(18)} \end{matrix}$

[0582] The right-most integral of Eq. VIII.A.4(17) is an elliptic integral.

[0583] An integration by parts also may be used for beginning the integration of the second term of Eq. VIII.A.4(12). $\begin{matrix} {{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{{\zeta \left( {a_{s}^{2} - \zeta^{2}} \right)}}{\cos^{- 1}\left( \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \zeta^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \zeta^{2}}} \right)}}} = \quad \quad {{{{\zeta\left( {a_{s}^{2} - \frac{\zeta^{2}}{3}} \right)}{\cos^{- 1}\left( \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \zeta^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \zeta^{2}}} \right)}}_{\zeta_{1}}^{\zeta_{2}}{- \quad {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}{\zeta^{2}\left( {{3a_{s}^{2}} - \zeta^{2}} \right)}\frac{\left( {a_{c}^{2} + a_{s}^{2} - \rho_{s}^{2} - \zeta^{2}} \right)}{3\left( {a_{s}^{2} - \zeta^{2}} \right)R^{1/2}}}}}} = {{\zeta \left( {a_{s}^{2} - \frac{\zeta^{2}}{3}} \right){\cos^{- 1}\left( \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \zeta^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \zeta^{2}}} \right)}}_{\zeta_{1}}^{\zeta_{2}}{+ {\quad\quad \quad {{\frac{2}{3}{a_{s}^{2}\left( {a_{c}^{2} - \rho_{s}^{2}} \right)}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{1}{R^{1/2}}}}} - {\frac{1}{3}\left( {a_{c}^{2} + {3a_{s}^{2}} - \rho_{s}^{2}} \right)\quad {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{\zeta^{2}}{R^{1/2}}}}} + {\frac{1}{3}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{\zeta^{4}}{R^{1/2}}}}} - {\frac{1}{3}{a_{s}^{3}\left( {a_{c}^{2} - \rho_{s}^{2}} \right)}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{1}{\left( {a_{s}^{2} - \zeta^{2}} \right)R^{1/2}}}}}}}}}}} & {{{VIII}.A}{.4}(19)} \end{matrix}$

[0584] where the integrals after the second equal sign in Eq. VIII.A.4(19) come from partial fraction separation of the integrand after the first equal sign. Each of the integrals involves one or more elliptic integrals.

[0585] The third term of Eq. VIII.A.4(12) is already in a form amenable to solution by elliptic integrals: $\begin{matrix} {{- \frac{1}{2}}{\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\quad {R^{1/2}.}}}} & {{{VIII}.A}{.4}(20)} \end{matrix}$

[0586] Combining these three expressions in Eqs. VIII.A.4(17, 19, and 20), yields the general expression for the ΔV used in Eqs. VIII.A.4(7 to 10): $\begin{matrix} {{{\Delta \quad V} = {{a_{c}^{2}\zeta \quad {\cos^{- 1}\left( \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \zeta^{2}}{2\rho_{s}a_{c}} \right)}{_{\zeta_{1}}^{\zeta_{2}}{{+ {\zeta \left( {a_{s}^{2} - {\frac{1}{3}\zeta^{2}}} \right)}}{\cos^{- 1}\left( \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \zeta^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \zeta^{2}}} \right)}}}_{\zeta_{1}}^{\zeta_{2}}} + {\frac{2}{3}{a_{s}^{2}\left( {a_{c}^{2} - \rho_{s}^{2}} \right)}L_{0}} + {\left( {{\frac{5}{3}a_{c}^{2}} - a_{s}^{2} + {\frac{1}{3}\rho_{s}^{2}}} \right)L_{2}} + {\frac{1}{3}L_{4}} - {\frac{1}{3}{a_{s}^{3}\left( {a_{c}^{2} - \rho_{s}^{2}} \right)}P} - {\frac{1}{2}E}}}{where}} & {{{VIII}.A}{.4}(21)} \\ {{L_{0} = {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{1}{R^{1/2}}}}},} & {{{VIII}.A}{.4}(22)} \\ {{L_{2} = {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{\zeta^{2}}{R^{1/2}}}}},} & {{{VIII}.A}{.4}(23)} \\ {{L_{4} = {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{\zeta^{4}}{R^{1/2}}}}},} & {{{VIII}.A}{.4}(24)} \\ {{P = {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\frac{1}{\left( {a_{s}^{2} - \zeta^{2}} \right)R^{1/2}}}}},{and}} & {{{VIII}.A}{.4}(25)} \\ {E = {\int_{\zeta_{1}}^{\zeta_{2}}\quad {{\zeta}\quad R^{1/2}}}} & {{{VIII}.A}{.4}(26)} \end{matrix}$

[0587] with R^(½) given by Eq. VIII.A.4(18). The explicit solutions to the L, P, and E integrals of Eqs. VIII.A.4(22-26) depend on the values of ζ₁, ζ₂, a_(s), and (a_(c)−ρ_(s)). These expressions are used in the preferred implementation.

[0588] Explicit Solution for Interior Volume V_(in) when a_(s)>a_(c)+ρ_(s)

[0589] In the case where a_(s) ²>(a_(c)+ρ_(s))², the preferred implementation follows the ζ integration up the z axis, the southern hemisphere's sphere circle eventually circumscribes the cylinder circle unless it hits the top of the cylinder first. The limits of integration are therefore given by

ζ₁=MAX[B,−(z _(t) −z _(s))] and ζ₂=MIN[A,−(z _(b) −z _(s))]  VIII.A.4(27)

[0590] where A and B are given below. If a_(s) ²>(a_(c)+ρ_(s))², then it follows that a_(s) ²>(a_(c)−ρ_(s))². Therefore, we define

A={square root}{square root over (a_(s) ²−(a_(c)−ρ_(s))²)}  VIII.A.4(28a)

[0591] and

B={square root}{square root over (a_(s) ²−(a_(c)+ρ_(s))²)}  VIII.A.4(28b)

[0592] and note that A>B>0. Then

R ^(½)={square root}{square root over ((A ²−ζ²)(ζ² −B ²))}.  VII.A.4(29)

[0593] The integrals for this form of R^(½) are readily found in references such as Gradshteyn and Ryzhik. Define $\begin{matrix} {{\lambda_{1} = {\sin^{- 1}\sqrt{\frac{A^{2} - \zeta_{1}^{2}}{A^{2} - B^{2}}}}},} & \text{VIII.A.4(30a)} \\ {{\lambda_{2} = {\sin^{- 1}\sqrt{\frac{A^{2} - \zeta_{2}^{2}}{A^{2} - B^{2}}}}},{and}} & \text{VIII.A.4(30b)} \\ {q = {\frac{\sqrt{A^{2} - B^{2}}}{A}.}} & \text{VIII.A.4(30c)} \end{matrix}$

[0594] Then, recalling the definitions for the elliptic integrals of Eqs. VIII.A.4(14 to 16), the following expressions for the integrals are obtained:

L ₀ =A ⁻¹ [F(λ₁ ,q)−F(λ₂ ,q)], ζ₂ ≦A  VIII.A.4(31)

[0595] Note that F(λ₂,q)=0 if ζ₂=A.

L ₂ =A[E(λ₁ ,q)−E(λ₂ ,q), ζ₂ ≦A  VIII.A.4(32)

[0596] Again, E(λ₂,q)]=0 if ζ₂=A. $\begin{matrix} {{L_{4} = {{A/{3\left\lbrack {{2\left( {A^{2} + B^{2}} \right){E\left( {\lambda_{1},q} \right)}} - {B^{2}{F\left( {\lambda_{1},q} \right)}}} \right\rbrack}} + {\zeta_{1}/{3\left\lbrack {\left( {A^{2} - \zeta_{1}^{2}} \right)\left( {\zeta_{1}^{2} - B^{2}} \right)} \right\rbrack}^{1/2}} - {A/{3\left\lbrack {{2\left( {A^{2} + B^{2}} \right){E\left( {\lambda_{2},q} \right)}} - {B^{2}{F\left( {\lambda_{2},q} \right)}}} \right\rbrack}} + {\zeta_{2}/{3\left\lbrack {\left( {A^{2} - \zeta_{2}^{2}} \right)\left( {\zeta_{2}^{2} - B^{2}} \right)} \right\rbrack}^{1/2}}}},\quad {\zeta_{2} \leq A}} & {{{VIII}.A}{.4}(33)} \end{matrix}$

[0597] Note that the entire second line is zero if ζ₂=A. $\begin{matrix} {P = {\frac{1}{A\left( {a_{s}^{2} - A^{2}} \right)}\left\lbrack {{\Pi \left( {\lambda_{1},\frac{A^{2} - B^{2}}{A^{2} - a_{s}^{2}},q} \right)} - {\Pi \left( {\lambda_{2},\frac{A^{2} - B^{2}}{A^{2} - a_{s}^{2}},q} \right)}} \right\rbrack}} & \text{VIII.A.4(34)} \end{matrix}$

[0598] The second elliptic integral with λ₂ as its first argument is zero if λ₂=A. Lastly, $\begin{matrix} {{E = {{A/{3\left\lbrack {{\left( {A^{2} + B^{2}} \right){E\left( {\lambda_{1},q} \right)}} - {2B^{2}{F\left( {\lambda_{1},q} \right)}}} \right\rbrack}} - {\zeta_{1}/{3\left\lbrack {\left( {A^{2} - \zeta_{1}^{2}} \right)\left( {\zeta_{1}^{2} - B^{2}} \right)} \right\rbrack}^{1/2}} - {A/{3\left\lbrack {{\left( {A^{2} + B^{2}} \right){E\left( {\lambda_{2},q} \right)}} - {2B^{2}{F\left( {\lambda_{2},q} \right)}}} \right\rbrack}} - {\zeta_{2}/{3\left\lbrack {\left( {A^{2} - \zeta_{2}^{2}} \right)\left( {\zeta_{2}^{2} - B^{2}} \right)} \right\rbrack}^{1/2}}}},\quad {\zeta_{2} \leq A}} & {{{VIII}.A}{.4}(35)} \end{matrix}$

[0599] Again, the entire second line of this expression is zero if ζ₂=A.

[0600] Explicit Solution for Interior Volume V_(in) when a_(s)≦a_(c)+ρ_(s)

[0601] In the case where a_(s) ²≦(a_(c)+ρ_(s))², A² is still defined as it was before, A²=a_(s) ²−(a_(c)−ρ_(s))², but B² becomes the negative of its previous definition:

B ²=(a _(c)+ρ_(s))²−a_(s) ².  VIII.A.4(36)

[0602] Although A² is always greater than zero, we simply have that B²≧0. The radical is defined differently as

R ^(½)={square root}{square root over ((A ²−ζ²)(ζ² +B ²))}  VIII.A.4(37)

[0603] and that changes the elliptic integral solutions of L₀, L₂, L₄, P, and E. Defining $\begin{matrix} {\gamma_{1} = {\sin^{- 1}\left( {\frac{\zeta_{1}}{A}\sqrt{\frac{A^{2} + B^{2}}{B^{2} + \zeta_{1}^{2}}}} \right)}} & \text{VIII.A.4(38a)} \\ {\gamma_{2} = {\sin^{- 1}\left( {\frac{\zeta_{2}}{A}\sqrt{\frac{A^{2} + B^{2}}{B^{2} + \zeta_{2}^{2}}}} \right)}} & \text{VIII.A.4(38b)} \\ {r = \frac{A}{\sqrt{A^{2} + B^{2}}}} & \text{VIII.A.4(38c)} \end{matrix}$

[0604] the following expressions are obtained for the integrals. Note that ζ₁ is inside absolute value signs so that only its magnitude is used. The upper limit ζ₂, however, may be positive, negative, or zero. A negative ζ₂ results in a change in sign for all terms in the integrals involving ζ₂. All the integrands are even in ζ so that all the integrals are odd. The elliptic integrals are also odd in their first argument. The expressions for the desired integrals are now $\begin{matrix} {L_{0} = {\frac{1}{\sqrt{A^{2} + B^{2}}}\left\lbrack {{F\left( {\gamma_{1},r} \right)} + {F\left( {\gamma_{2},r} \right)}} \right\rbrack}} & {{{VIII}.A}{.4}(39)} \\ {L_{2} = {{\sqrt{A^{2} + B^{2}}{E\left( {\gamma_{1},r} \right)}} - {\frac{B^{2}}{\sqrt{A^{2} + B^{2}}}{F\left( {\gamma_{1},r} \right)}} - {{\zeta_{1}}\sqrt{\frac{A^{2} - \zeta_{1}^{2}}{B^{2} + \zeta_{1}^{2}}}} + {\sqrt{A^{2} + B^{2}}{E\left( {\gamma_{2},r} \right)}} - {\frac{B^{2}}{\sqrt{A^{2} + B^{2}}}{F\left( {\gamma_{2},r} \right)}} - {\zeta_{2}\sqrt{\frac{A^{2} - \zeta_{2}^{2}}{B^{2} + \zeta_{2}^{2}}}}}} & {{{VIII}.A}{.4}(40)} \end{matrix}$

$\begin{matrix} {L_{4} = {\frac{1}{3\sqrt{A^{2} + B^{2}}}{\quad\left\lbrack {\left. {\quad{{\left( {{2B^{2}} - A^{2}} \right)B^{2}{F\left( {\gamma_{1},r} \right)}} - {2\left( {B^{4} - A^{4}} \right){E\left( {\gamma_{1},r} \right)}}}} \right\rbrack - {\frac{\zeta_{1}}{3}\left( {{2A^{2}} - B^{2} + \zeta_{1}^{2}} \right)\sqrt{\frac{A^{2} - \zeta_{1}^{2}}{B^{2} + \zeta_{1}^{2}}}} + {\frac{1}{3\sqrt{A^{2} + B^{2}}}{\quad\quad {\left\lbrack {{\left( {{2B^{2}} - A^{2}} \right)B^{2}{F\left( {\gamma_{2},r} \right)}} - {2\left( {B^{4} - A^{4}} \right){E\left( {\gamma_{2},r} \right)}}} \right\rbrack - {\frac{\zeta_{2}}{3}\left( {{2A^{2}} - B^{2} + \zeta_{2}^{2}} \right)\sqrt{\frac{A^{2} - \zeta_{2}^{2}}{B^{2} + \zeta_{2}^{2}}}}}}}} \right.}}} & \text{VIII.A.4(41)} \end{matrix}$

$\begin{matrix} {P = {\frac{1}{{a_{s}^{2}\left( {a_{s}^{2} + B^{2}} \right)}\sqrt{A^{2} + B^{2}}}{\quad\left\lbrack {{B^{2}{\Pi \left( {\gamma_{1},n,r} \right)}} + {a_{s}^{2}{F\left( {\gamma_{1},r} \right)}} + {B^{2}{\Pi \left( {\gamma_{2},n,r} \right)}} + {a_{s}^{2}{F\left( {\gamma_{2},r} \right)}}} \right\rbrack}}} & \text{VIII.A.4(42a)} \end{matrix}$

[0605] where $\begin{matrix} {n = \frac{A^{2}\left( {a_{s}^{2} + B^{2}} \right)}{a_{s}^{2}\left( {A^{2} + B^{2}} \right)}} & \text{VIII.A.4(42b)} \end{matrix}$

[0606] and $\begin{matrix} {E = {{\frac{1}{3}{\sqrt{A^{2} + B^{2}}\left\lbrack {{B^{2}{F\left( {\gamma_{1},r} \right)}} - {\left( {B^{2} - A^{2}} \right){E\left( {\gamma_{1},r} \right)}}} \right\rbrack}} + {\frac{\zeta_{1}}{3}\left( {\zeta_{1}^{2} + {2B^{2}} - A^{2}} \right)\sqrt{\frac{A^{2} - \zeta_{1}^{2}}{B^{2} + \zeta_{1}^{2}}}} + {\frac{1}{3}{\sqrt{A^{2} + B^{2}}\left\lbrack {{B^{2}{F\left( {\gamma_{2},r} \right)}} - {\left( {B^{2} - A^{2}} \right){E\left( {\gamma_{2},r} \right)}}} \right\rbrack}} + {\frac{\zeta_{2}}{3}\left( {\zeta_{2}^{2} + {2B^{2}} - A^{2}} \right)\sqrt{\frac{A^{2} - \zeta_{2}^{2}}{B^{2} + \zeta_{2}^{2}}}}}} & \text{VIII.A.4(43)} \end{matrix}$

[0607] which completes the solutions for the intersection of a sphere and cylinder. The explicit expressions for ζ₁ and ζ₂ are given in Section VIII.A.4.a. These expressions are used in the preferred implementation to determine the intersection.

[0608] The task of determining the packing fraction also may be accomplished according to an aspect of the invention using a modified approach.

[0609] Recall that the radial distance of the sphere center from the z axis by

ρ_(s) =[x _(s) ² +y _(s) ²]^(½).  (2.3-2)

[0610] Also recall that there are four possible cases for this overlap problem. In Case 1, the sphere is completely outside the cylinder so V_(in)=0. In Case 2, the sphere is completely inside the cylinder so V_(in)=(4/3)πa_(s) ³. In Case 3, the cylinder is completely inside the sphere so V_(in)=πa_(c) ²(z_(t)−z_(b)). In Case 4, the sphere and cylinder intersect each other and the expression for V_(in) is more complex as will be derived below.

[0611] Case 1: Sphere Completely Outside Cylinder

[0612] The sphere is completely outside the cylinder

V_(in)=0  (2.3-5)

[0613] only if one of the following conditions are met:

[0614] If the sphere's north pole is lower than the cylinder bottom . . .

z _(s) +a _(s) ≦z _(b)  (2.3-6a)

[0615] Or if the sphere's south pole is above the cylinder top . . .

z _(s) −a _(s) ≧z _(t)  (2.3-6b)

[0616] Or if the sphere is more than its radius away from the cylinder side . . .

ρ _(s) −a _(s) ≧a _(c)  (2.3-6c)

[0617] Or if the sphere center is above the cylinder top and is more than its radius away from the upper cylinder edge . . .

(ρ_(s) −a _(c))²+(z _(s) −z _(t))² ≧a _(s) ² and z _(s) >z _(t) and ρ_(s) >a _(c)  (2.3-6d)

[0618] Or if the sphere center is below the cylinder bottom and is more than its radius away from the lower cylinder edge . . .

(ρ_(s) −a _(c))²+(z _(b) −z _(s))² ≧a _(s) ² and z _(s) <z _(b) and ρ_(s) >a _(c).  (2.3-6d)

[0619] Case 2: Sphere Completely Inside Cylinder

[0620] The sphere is completely inside the cylinder

V _(in)=(4/3)πa_(s) ³  (2.3-3)

[0621] only if all three of the following conditions are simultaneously met:

[0622] If the sphere's north pole is no higher than the cylinder top . . .

z _(s) +a _(s) ≦z _(t)  (2.3-4a)

[0623] And if the sphere's south pole is no lower than the cylinder bottom . . .

z _(s) −a _(s) ≧z _(b)  (2.3-4b)

[0624] And if the sphere's equator nowhere exceeds the cylinder radius . . .

ρ_(s) +a _(s) ≦a _(c).  (2.3-4c)

[0625] Case 3: Cylinder Completely Inside Sphere

[0626] The cylinder is completely inside the sphere

V _(in) =πa _(c) ²(z _(t) −z _(b))  (2.3-7)

[0627] if both the following two conditions are met:

[0628] If the upper edge of the cylinder is inside the sphere . . .

(ρ_(s) +a _(c))²+(z _(t) −z _(s))² ≦a _(s) ²  (2.3-8a)

[0629] And if the lower edge of the cylinder is inside the sphere . . .

(ρ_(s) +a _(c))²+(z _(s) −z _(b))² ≦a _(s) ².  (2.3-8b)

[0630] Case 4: Cylinder and Sphere Intersect

[0631] Again, there are several subsets of Case 4. To efficiently organize them, we define two circles: the sphere circle and the cylinder circle. The sphere circle is the perimeter of the sphere's cross section at a given z altitude. Its radius is

r _(s) =[a _(s) ²−(z−z _(s))²]^(½) , z _(s) −a _(s) ≦z≦z _(s) +a _(s)  (2.3-9)

[0632] and its radial position ρ_(s) is given by Eq. (2). Likewise the cylinder circle is the perimeter of the cylinder's cross section which has constant radius a_(c) at any z altitude between z_(b) and z_(t) and is centered on the z axis.

[0633] To describe the intersection of sphere and cylinder, we define four subcases for he relationship of the sphere circle and the cylinder circle at a particular altitude z:

[0634] Subcase 4.1: The sphere circle is completely enclosed in the cylinder circle.

[0635] Subcase 4.2: The two circles do not overlap or one or both are nonexistent.

[0636] Subcase 4.3: The cylinder circle is completely enclosed in the sphere circle.

[0637] Subcase 4.4: The two circles intersect.

[0638] To find V_(in), our task is reduced to integrating in z the overlap areas of the two circles A_(in) from the altitude where one subcase holds to the altitude where another subcase holds.

For Subcase 4.1, A_(in)=πa_(s) ².  (2.3-10a)

For Subcase 4.2, A_(in)=0.  (2.3-10b)

For Subcase 4.3, A_(in)=πa_(c) ².  (2.3-10c)

For Subcase 4.4, A _(in) =a _(c) ²(α−cos α sin α)+r _(s) ²(β−cos βsin β)  (2.3-10d)

[0639] where r_(s) is given by Eq. (2-3-9) and $\begin{matrix} {{\cos \quad \alpha} = \frac{\rho_{s}^{2} + a_{c}^{2} - r_{s}^{2}}{2\rho_{s}a_{c}}} & \text{(2.3-11a)} \\ {{\sin \quad \alpha} = \frac{\sqrt{\left\lbrack {r_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} - r_{s}^{2}} \right\rbrack}}{2\rho_{s}a_{c}}} & \text{(2.3-11b)} \\ {{\cos \quad \beta} = \frac{\rho_{s}^{2} + r_{s}^{2} - a_{c}^{2}}{2\rho_{s}r_{s}}} & \text{(2.3-12a)} \\ {{\sin \quad \beta} = {\frac{\sqrt{\left\lbrack {r_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} - r_{s}^{2}} \right\rbrack}}{2\rho_{s}r_{s}}.}} & \text{(2.3-12b)} \end{matrix}$

[0640] It is now necessary to determine a series of altitudes at which the cylinder circle and the sphere circle change from one subcase to another in Case 4.

[0641] A sphere and a cylinder side can intersect each other at either 0, 2, or 4 altitudes. Pairs of altitudes may be degenerate (two solutions having the same altitude) if the sphere just nicks the cylinder wall. The solutions for these altitudes come from solving the following equation:

[r _(s)(z)]² =[a _(c)±ρ_(s)]²  (2.3-13a)

[0642] or

a _(s) ²−(z−z _(s))² =[a _(c)±ρ_(s)]²  (2.3-13b)

[0643] which, using Eq. (2-3-9), has the four solutions

z=z _(s) ±{square root}{fraction (a_(s) ²−(a_(c)±ρ_(s))²)}.  (2.3-14)

[0644] The + sign in the first ± of Eq. (2-3-14) denotes the upper or northern hemisphere intersection altitude; the − sign denotes the lower or southern hemisphere intersection altitude. The + sign in the second ± of Eq. (2-3-14) denotes intersection with the far cylinder wall, on the opposite side of the z axis from the sphere's side; the − sign denotes intersection with the near cylinder wall, on the same side of the z axis as the sphere.

[0645] Armed with these four solutions, we will now consider each of the four subcases of Case 4, but we will consider separately whether the sphere circle lies in the southern hemisphere of the sphere or whether it is the equatorial plane or northern hemisphere. We consider the four subcases separately for the two hemispheres making eight situations in all. We consider the hemispheres separately because if the sphere circle is in the southern hemisphere, it is increasing in size as z increases. Hence the preferred implementation can determine the altitude at which subcases change. If the sphere circle is its equatorial plane or in its the northern hemisphere, it is decreasing in size as z decreases and the altitude at which subcases will change again can be determined.

[0646] We now outline the overall logic used in the preferred implementation to find the altitudes at which the subcases for Case 4 change. Let z_(low) be the lower altitude of the subcase region currently being examined and z_(high) be its upper altitude.

[0647] The absolute bounds below or above which there can never be any overlap between sphere and cylinder is given by

z ₀=MAX[z _(b) ,z _(s) −a _(s)]  (2.3-15)

[0648] for the lower bound and

z ₅=MIN[z _(t) ,z _(s) +a _(s)]  (2.3-16)

[0649] for the upper bound. The altitudes zi through Z4 correspond to the different intersection altitudes (if they exist) of the sphere's polar plane that is perpendicular to the cylinder axis. A sphere's polar plane is the plane which intersects the sphere in a great circle perpendicular to the equatorial plane. It can be oriented at any azimuthal angle. The polar plane of interest to us is the one passing through the cylinder axis. The intersection altitudes are illustrated in FIG. ______.

[0650] In ascending order (again, if they exist) the intersection altitudes are:

[0651] Southern hemisphere intersection with cylinder wall closest to sphere center

z ₁ =z _(s) −{square root}{square root over (a_(s) ²−(a_(c)−ρ_(s))²)}  (2.3-17)

[0652] Southern hemisphere intersection with cylinder wall furthest from sphere center

z ₂ =z _(s) −{square root}{square root over (a_(s) ²−(a_(c)−ρ_(s))²)}  (2.3-18)

[0653] Northern hemisphere intersection with cylinder wall furthest from sphere center

z ₃ =z _(s) +{square root}{square root over (a_(s) ²−(a_(c)−ρ_(s))²)}  (2.3-19)

[0654] Northern hemisphere intersection with cylinder wall closest to sphere center

z ₄ =z _(s) +{square root}{square root over (a_(s) ²−(a_(c)−ρ_(s))²)}.  (2.3-20)

[0655] In all four of these solutions, if the argument of the square root is negative, the square root is replaced by zero. If the sphere intersects both sides of the cylinder, there are four real solutions; if only one side, there are two real solutions; if not at all, there are no real solutions of Eqs. 17 through 20. The figure below shows the two real solutions for a sphere that intersects only one side of the cylinder.

[0656] The method used in the preferred implementation for finding the volume V_(in) of a sphere that lies inside a cylinder will now be discussed. The method is divided into two DO WHILE loops, one for the southern hemisphere and one for the northern hemisphere (which includes the sphere's equatorial plane). This is convenient because for the southern hemisphere the sphere circle is always increasing with increasing z while for the northern hemisphere it is always decreasing. The method as specifically implemented here has a number of comments so that the reader can follow the reasoning guiding it. V_(in) = 0 ! V_(in) is the volume of this sphere lying inside the ! cylinder. Initialize it to zero z₀ = MAX[z_(b), z_(s) − a_(s)] ! z₀ and z₅ are the absolute lower and upper z₅ = MIN[z_(t), z_(s) + a_(s)]! limits of possible sphere-cylinder overlap. IF (z_(s) > z_(b)) THEN ! The southern hemisphere can contribute to V_(in) if and ! only if this statement if true. Otherwise it lies ! beneath the cylinder bottom and cannot contribute. ! (It might not contribute even when the above ! statement if true but that is checked below.) z_(low) = z₀ ! Initialize z_(low) to smallest possible value. r_(s)(z_(low))= [a_(s) ²-[z_(low)−z_(s))²]^(½) ! Find initial sphere circle ! radius. It is 0 if square ! root argument ≦ 0. ! Find the initial southern hemisphere subcase. IF (p_(s) + r_(s)(z_(low)) < a_(c)) THEN subcase = 1 ! Sphere circle inside cylinder circle. ELSE IF (p_(s) − r_(s)(z_(low)) > a_(c)) THEN subcase = 2 ! Sphere circle outside cylinder circle. ELSE IF (r_(s)(z_(low)) − p_(s) ≧ a_(c)) THEN subcase = 3 ! Cylinder circle inside sphere circle. ELSE subcase = 4 ! Sphere circle intersects cylinder circle. END IF ! We exit the DO WHILE loop when the subcase is no longer a positive ! integer. Remember that since we are in the southern hemisphere, the ! sphere circles are expanding with increasing z. DO WHILE (subcase > 0) ! Southern hemisphere loop. IF (subcase = 1) THEN ! The sphere circle lies inside the cylinder circle. ! It expands with increasing z until one of three ! things happen: ! (1) It hits the top of the cylinder. ! (2) It intersects the cylinder circle. ! (3) It reaches its equatorial plane. ! Numbers (2) and (3) can be combined if we agree to ! define z₁ with the square root replaced by zero if ! its argument is negative. w = a_(s) ² − (a_(c) − p_(s))² IF (w > 0) THEN z₁ = z_(s) − w^(½) ELSE z₁ = z_(s) END IF z_(high) = MIN[z_(t), z₁] V_(in) = V_(in) + V₁(z_(low),Z_(high)) ! We'll derive an explicit ! expression for this V₁ later. ! Now we must find the next subcase. IF (z_(high) < MIN[z_(s),z_(t)]) THEN ! There is another ! subcase to be ! addressed in the ! southern hemisphere. IF (p_(s) > 0) THEN ! Sphere is not concentric with subcase = 4 ! the cylinder so it will ! expand until it intersects. ELSE ! Here, the sphere is concen- subcase = 3 ! tric so it will expand END IF ! until it perfectly circum- ! scribes the cylinder ! circle. ELSE ! You reached the end of southern subcase = 0 ! hemisphere contribution. End the END IF ! S. hemisphere's DO WHILE loop. ELSE IF (subcase = 2) THEN ! The sphere circle lies outside the cylinder circle ! until it expands to the point where it intersects ! the cylinder. This intersection must happen or we ! wouldn't be here in Case 4. The intersection ! happens at z₁. There is no contribution to V_(in) from ! this region. We only need to find z_(high) = z₁. w = a_(s) ² − (a_(c) p_(s))² IF (w > 0) THEN z_(high) = z_(s) − w^(½) subcase = 4 ! Not done yet with S. hemisphere. ELSE z_(high) = z_(s) subcase = 0 ! Reached equatorial plane. Now END IF ! we're done with S. hemisphere. ELSE IF (subcase = 3) THEN ! The cylinder circle lies inside the sphere circle. ! Since the sphere circle is expanding, it will ! remain inside until it reaches the first of either ! the top of the cylinder or its equatorial plane. z_(high) = MIN[z_(t), z_(s)] V_(in) = V_(in) + V₂z_(low),z_(high)) ! We'll derive an explicit ! expression for this V₂later. subcase = 0 ELSE IF (subcase = 4) THEN ! The only possibility left is that sphere and ! cylinder circles initially intersect. This region ! extends upward until one of three things happen: ! (1) We reach the top of the cylinder. ! (2) We reach the sphere's equatorial plane. ! (3) We reach a point at which the sphere circle ! completely circumscribes the cylinder circle. ! We cannot reach the top of the sphere in this case ! because we are only dealing with the southern ! hemisphere. (Remember z₂ = z_(s) if the argument of ! the square root is negative.) w = a_(s) ² - (a_(c) + p_(s))² IF (w > 0) THEN z₂ = z_(s) − w^(½) subcase = 3 ELSE z₂ = z_(s) subcase = 0 END IF z_(high) = MIN[z_(t), z_(s), z₂] V_(in) = V_(in) + V₃(z_(low),z_(high)) ! We'll derive a numerical ! integration for this V₃later. END IF ! If you have reached either the cylinder top or the ! sphere's equatorial plane, you are done with the southern ! hemisphere's contribution to V_(in). Go to the northern ! hemisphere next. (We use ≧ signs below in case of round- ! off error. With infinite precision, z_(high) could never be ! greater than z_(t) or z_(s).) If (z_(high) ≧ z_(t) OR z_(high) ≧ z_(s)) THEN ! Redundant check saying subcase = 0 ! we're done with the southern hemisphere. ELSE z_(low) = z_(high) ! Cycle back through the DO WHILE loop END IF ! for the next region in the southern ! hemisphere contributing to V_(in). END DO ! End of southern hemisphere DO WHILE loop. END IF ! End of southern hemisphere overall IF statement. IF (z_(s) < z_(t)) THEN ! The northern hemisphere can contribute to V_(in) if and ! only if this statement is true. Otherwise it lies ! above the cylinder top and cannot contribute. (It ! might not contribute even when the above statement is true.) z_(low) = MAX [z_(b), z_(s]) r_(s)(z_(low))=[a_(s) ²−(z_(low)−z_(s))²]^(½) ! Find initial sphere circle radius in ! N. hemisphere. It is 0 if square root ! argument ≦ 0. ! Find the initial northern hemisphere subcase. IF (p_(s) + r_(s)(z_(low) ≦ a) _(c)) THEN subcase = 1 ! Sphere circle inside cylinder circle. ELSE IF (p_(s) − r_(s)(z_(low)) ≧ a_(c)) THEN subcase = 0 ! Sphere circle outside cylinder circle. ! Although this is actually subcase 2, since ! N. hemisphere sphere circle can only contract ! it will never intersect the cylinder ! circle if it does not initially intersect it. ! Therefore, we set the subcase to zero so the ! N. hemisphere's DO WHILE loop will end. ELSE IF (p_(s) + a_(c) < r_(s)(z_(low))) THEN subcase = 3 ! Cylinder circle inside sphere circle. ELSE subcase = 4 ! Sphere circle intersects cylinder circle. END IF DO WHILE (subcase > 0) ! Begin northern hemisphere loop. IF (subcase = 1) THEN ! The sphere circle lies inside the cylinder circle. ! Since the sphere circle shrinks as z increases, it ! cannot ever intersect the cylinder circle. It can ! only end at its north pole or at the top of the ! cylinder. That ending position is z₅. z_(high) = z₅ V_(in) = V_(in) + V₁(z_(low,z) _(high)) ! We'll derive an explicit ! expression for V₁later. subcase = 0 ELSE IF (subcase = 2) THEN ! The sphere circle is inside the cylinder circle. ! In the northern hemisphere this means they will ! never intersect more so there will be no more ! contribution to V_(in). subcase = 0 ELSE IF (subcase = 3) THEN ! The cylinder circle lies inside the sphere circle. ! The sphere circle will contract until we hit top ! of the cylinder or until we reach z₃ which is the ! point at which the two circles will intersect. w = a_(s) ² − (a_(c) + p_(s))² ! w is nonnegative or we ! couldn't be here. z₃ = z_(s) + x^(½) z_(high) = MIN[z_(t), z₃] V_(in) = V_(in) + V₂(z_(low),z_(high)) ! We'll derive an explicit ! expression for V₂ later. IF (z_(high) < z_(t)) THEN IF (p_(s) > 0) THEN ! Sphere is not concentric subcase = 4 ! with cylinder so it will ! contract until it inter- ! sects the cylinder circle. ELSE ! The sphere is concentric so subcase = 1 ! it will contract until it END IF ! suddenly lies completely ! inside the cylinder circle. ELSE ! If we're here, we reached subcase = 0 ! top of the cylinder; we're END IF ! done with N. hemisphere. ELSE IF (subcase = 4) THEN ! The only possibility left is that sphere and ! cylinder circles initially intersect. This region ! extends upward until one of two things happen: ! (1) We reach the top of the cylinder before ! reaching the north pole. ! (2) The intersection stops with the sphere circle ! now either completely inside or completely ! outside the cylinder circle. This happens at ! z₄. w = a_(s) ² - (a_(c) − p_(s))² ! w is never negative or we ! wouldn't be here. z₄ = z_(s) + w^(½) z_(high) = MIN[z_(t), z₄] V_(in) = V_(in) + V₃(z_(low),z_(high)) ! We'll derive a numerical ! solution for V₃ later. IF (p_(s) < a_(c)) THEN subcase = 1 ! Next, sphere circle will lie ! inside cylinder circle. ELSE subcase = 0 ! Next, sphere circle will lie ! outside cylinder circle. END IF END IF ! (Note the second logical expression in the IF statement below is z₅, ! not z_(s).) IF (z_(high) ≧ z_(t) OR z_(high) ≧ z₅) THEN ! Redundant check saying subcase = 0 ! we're done with the northern hemisphere. ELSE z_(low) = z_(high) ! Cycle back through the DO WHILE loop END IF ! for the next region in the northern ! hemisphere's contribution to V_(in). END DO ! End of northern hemisphere DO WHILE loop. END IF ! End of northern hemisphere overall IF statement.

[0657] Expressions for the three volume expressions V_(i)(z_(low), z_(high)), i=1, 2, or 3 will now be addressed. Remember in the following that a_(c) is the cylinder radius, a_(s) is the sphere radius, (x_(s), y_(s), z_(s)) is the position of the sphere's center, and ρ_(s)={square root}{square root over (x_(x) ²+y_(s) ²)} is the radial distance of the sphere center from the cylinder axis.

[0658] Derivation of V₁.

[0659] The volume V₁ is an integral of full sphere circles from z_(low) to z_(high) because the sphere circles lie entirely within the cylinder circle. $\begin{matrix} {{V_{1} = {{\pi {\int_{z_{low}}^{z_{high}}{{z\left\lbrack {r_{s}(z)} \right\rbrack}^{2}}}} = {\pi {\int_{z_{low}}^{z_{high}}{{z\left\lbrack {a_{s}^{2} - \left( {z - z_{s}} \right)^{2}} \right\rbrack}}}}}}{or}} & \text{(2.3-21)} \\ {V_{1} = {\frac{\pi}{3}\left( {z_{high} - z_{low}} \right){\quad\left\lbrack {{3a_{s}^{2}} - z_{high}^{2} - z_{low}^{2} + {z_{high}\left( {{3z_{s}} - z_{low}} \right)} - {3{z_{s}\left( {z_{s} - z_{low}} \right)}}} \right\rbrack}}} & \text{(2.3-22)} \end{matrix}$

[0660] where z_(low) and z_(high) depend on where we are in the above method. Their values are given in the implementation shown above.

[0661] Derivation of V₂.

[0662] The volume V₂ is the integral of the cylinder circle from z_(low) to z_(high) because the cylinder circle lies entirely within the sphere circle. It is given simply as

V ₂ =πa _(c) ²(z _(high) −z _(low)).  (2.3-23)

[0663] Derivation of V₃.

[0664] The volume V₃ is the integral of intersecting sphere and cylinder circles from z_(low) to z_(high). The limits are always given in the method as described above. The intersect area is given by Eqs. 2-3-10, 11, and 12 which we must integrate in z. $\begin{matrix} {{V_{3} = {\int_{z_{low}}^{z_{high}}\quad {{z}\left\{ {{a_{c}^{2}\left\lbrack {\alpha - {\cos \quad \alpha \quad \sin \quad \alpha}} \right\rbrack} + {\left\lbrack {a_{s}^{2} - \left( {z - z_{s}} \right)^{2}} \right\rbrack \left\lbrack {\beta - {\cos \quad \beta \quad \sin \quad \beta}} \right\rbrack}} \right\}}}}{where}} & \text{(2.3-24)} \\ {{\cos \quad \alpha} = \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \left( {z - z_{s}} \right)^{2}}{2\rho_{s}a_{c}}} & \text{(2.3-25)} \\ {{\sin \quad \alpha} = \frac{\sqrt{\left\lbrack {a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2} - \left( {z - z_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} - a_{s}^{2} + \left( {z - z_{s}} \right)^{2}} \right\rbrack}}{2\rho_{s}a_{c}}} & \text{(2.3-26)} \\ {{\alpha = {\arccos \left\lbrack \frac{\rho_{s}^{2} + a_{c}^{2} - a_{s}^{2} + \left( {z - z_{s}} \right)^{2}}{2\rho_{s}a_{c}} \right\rbrack}}{and}} & \text{(2.3-27)} \\ {{\cos \quad \beta} = \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} + \left( {z - z_{s}} \right)^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \left( {z - z_{s}} \right)^{2}}}} & \text{(2.3-28)} \\ {{\sin \quad \beta} = \frac{\sqrt{\left\lbrack {a_{s}^{2} - \left( {a_{c} - \rho_{s}} \right)^{2} - \left( {z - z_{s}} \right)^{2}} \right\rbrack \left\lbrack {\left( {a_{c} + \rho_{s}} \right)^{2} + a_{s}^{2} - \left( {z - z_{s}} \right)^{2}} \right\rbrack}}{2\rho_{s}\sqrt{a_{s}^{2} - \left( {z - z_{s}} \right)^{2}}}} & \text{(2.3-29)} \\ {\beta = {{\arccos \left\lbrack \frac{\rho_{s}^{2} - a_{c}^{2} + a_{s}^{2} - \left( {z - z_{s}} \right)^{2}}{2\rho_{s}\sqrt{a_{s}^{2} - \left( {z - z_{s}} \right)^{2}}} \right\rbrack}.}} & \text{(2.3-30)} \end{matrix}$

[0665] The integral of Eq. 2-3-24 could be done analytically in terms of complete and incomplete elliptic integrals of the first, second, and third kinds. However, this solution is so cumbersome that it is more efficient to perform it numerically, especially because the integrand is quite smooth and well-behaved so that a Romberg integration is very efficient and contains an accurate error assessment.

[0666] Calculating the Total Volume Fraction for a Pack

[0667] The preferred implementation also can determine the volume fraction φ of the pack. Only the innermost cylinder contains particles that look like a full three-dimensional pack. The outer cylinders do not contain the particles the inner cylinders contain. However, it would be unfortunate to throw away all the pack information the outer cylinders contain. They do perturb the pack of the innermost cylinder correctly and their correct geometry for the particles they contain should somehow be used in estimating the volume fraction of the pack.

[0668] The preferred implementation determines the volume fraction φ in the following way. The j-th cylinder can contain all particle modes whose cylinder radii are less than or equal to its cylinder radius a_(c)(j). As long as the water level option of pack building is operating, the j-th mode particles are distributed approximately as they would be in a truly three-dimensional pack. The preferred implementation therefore calculates the volume fraction φ_(j) of Mode j particles within the j-th cylinder and calls it the j-th partial volume fraction. It does likewise for all the other modes, e.g., J of them. Then the total volume fraction is simply the sum of all the partial volume fractions: $\begin{matrix} {\varphi = {\sum\limits_{j = 1}^{J}{\varphi_{j}.}}} & \text{VIII.A.5(1)} \end{matrix}$

[0669] If desired, the user can specify that only the volume fraction of the innermost cylinder, where the pack is three dimensional, will be calculated.

[0670] To calculate the partial volume fraction φ_(j) in the j-th cylinder, the preferred implementation sums the interior volume of each Mode j sphere inside the j-th cylinder. Let n_(j) be the number of Mode j spheres in the j-th cylinder. Let V_(j)(k) be the volume inside the cylinder of the k-th sphere of Mode j. Then $\begin{matrix} {{V_{tot}(j)} = {\sum\limits_{k = 1}^{n_{j}}{{V_{j}(k)}.}}} & \text{VIII.A.5(2)} \end{matrix}$

[0671] Dividing this total interior partial volume by the volume of the j-th cylinder V_(cyl)(j) gives the partial volume fraction φ_(j) for the pack:

φ_(j) =V _(tot)(j)/V _(cyl)(j)  VIII.A.5(3)

[0672] where

V _(cyl)(j)=π[a _(c)(j)]² [z _(top)(j)−z _(bot)(j)].  VII.A.5(4)

[0673] The user has the option of making calculating volume fractions in cylinders that are a little smaller than the actual cylinders used in making the pack so that possible wall effects can be eliminated from the calculation. Remember, however, that the cylinder walls are barriers to the particle centers, not their leading edges so that disturbances to the pack from wall effects normally will be small.

[0674] Finding the Radial Distribution Functions

[0675] The radial distribution functions, denoted by g_(ij)(r)dr, are probability distribution functions denoting the mean number of Mode or Submode j particles whose centers are between r and r+dr from the centers of Mode or Submode i particles throughout the pack. They can be important in establishing many properties of random packs. Because the packs here are assumed random, only the scalar radial distance r is used rather than vector r in this implementation.

[0676] Reduced dimension packs do not extend equally in all directions. They are a series of concentric cylinders. Therefore, for a given Mode or Submode i particle, the preferred implementation calculates the volume of the spherical shell segment centered on Particle i and lying between r and r+dr, that lies inside the j-th cylinder. Then it counts all Mode j particles lying in that shell segment. Dividing the number of Mode j particles by the volume of the shell segment gives an approximation to g_(ij)(r)dr at that position r.

[0677] Finding the volume of this spherical shell segment is not a trivial procedure. Fortunately, a means to calculate the total sphere volume lying inside any cylinder is described above. Therefore, the preferred implementation can calculate the total volume of an imaginary sphere of radius r+dr, centered at Particle i, that lies inside the j-th cylinder, and subtract from it the total volume of the concentric sphere of radius r to obtain the volume of the spherical shell segment between r and r+dr lying in the j-th cylinder.

[0678] The user specifies the maximum radial distance r_(max)(ij) for which g_(ij) is desired and the number of bins m_(ij) into which it divided r_(max)(i,j). Then the bin widths have finite width

Δr _(ij) =r _(max)(i,j)/m _(ij)  VIII.B(1)

[0679] rather than infinitesimal width dr. Then the g_(ij) are determined as follows.

[0680] First, note that the g_(ij)(r) are zero for r<a_(i)+a_(j). Then, consider a particular Mode i particle with index number i_(h). Denote the number of Mode j particles in the first bin from Particle i_(h) particle by N_(j)(i_(h); a_(i)+a_(j)). The first bin lies between (a_(i)+a_(j)) and (a_(i)+a_(j))+Δr_(ij). In general, the number of Mode j particles lying in the k-th bin from Particle i_(h) is denoted by N_(j)(i_(h); r_(k)) where r_(k)=a_(i)+a_(j)+(k−1)Δr_(ij), k=1, 2, . . . , m_(ij).

[0681] Now consider the volume of the k-th bin from Particle i_(h) that lies inside the j-th cylinder. This can be obtained from the volumes V_(in) of previous sections where V_(in)=V_(in)(x_(s), y_(s), z_(s), a_(s); a_(c), z_(bot), z_(top)). The argument list contains the position of the sphere center (x_(s), y_(s), z_(s)), the sphere radius a_(s), the cylinder radius a_(c), and the cylinder's bottom and top altitudes (z_(bot), z_(top)). The volume for the k-th bin about Particle i_(h) is then given by

V _(in)(i _(h) ,j;k)=V _(in)(x _(ih) ,y _(ih) ,z _(ih),r_(k+1) ;a _(cj) ,z _(bot,j) ,z _(top,j))−V _(in)(x _(ih) ,y _(ih) ,z _(ih) ,r _(k) ;a _(c,j) ,z _(bot,j) ,z _(top,j))  VIII.B(2)

[0682] and the number density of Mode j particles in this volume is

σ(i _(h) ,j;k)=N _(j)(i _(h) ;r _(k))/V _(in)(i _(h) ,j;k).  VIII.B(3)

[0683] Finally, to obtain the g_(ij)(r), the above expression can be averaged over all Mode i particles: $\begin{matrix} {{g_{ij}(r)} \cong {\frac{1}{n_{i}}{\underset{i_{h}}{\sum\limits^{n_{i}}}{\sigma \left( {i_{h},{j;k}} \right)}}}} & \text{VIII.B(4)} \end{matrix}$

[0684] if r>a_(i)+a_(j) and is zero otherwise. The term k is the integer lying in the range

(r−a _(i) −a _(j))/Δr _(ij) <k≦1+(r−a _(i) −a _(j))/Δr _(ij).  VIII.B(5)

[0685] If r is so large or so small for a particular particle i_(h) that the spherical shell containing it misses the j-th cylinder altogether, then that term in the sum of Eq. VIII.B(4) is omitted altogether.

[0686] The normalized radial distribution function, denoted G_(ij)(r), is given by

G _(ij)(r)=g _(ij)(r)/(4πr ²)  VIII.B(6)

[0687] or in our finite bin width treatment, it is given by $\begin{matrix} {{G_{ij}(r)} = {\frac{g_{ij}(r)}{\frac{4}{3}{\pi \left( {r_{k + 1}^{3} - r_{k}^{3}} \right)}}.}} & \text{VIII.B(7)} \end{matrix}$

[0688] It is the mean number density n_(j) of Type j particles at a distance r from a Type i particle. Thus normalized, the function G_(ij)(r) approaches the constant n_(j) as r grows large rather than increase quadratically as g_(ij)(r) does. nj represents the number of j particles per unit volume, e.g., concentration, output from the preferred implementation.

[0689] Finding the Coordination Numbers

[0690] The coordination number Ω_(ij) is the mean number of Mode j particles touching a Mode i particle. Again, because a reduced dimension pack is ordered in concentric cylinders rather than being isotropic in all directions, the preferred implementation finds how much of the surface of the i-th particle is available for Mode j particles to touch. That is equivalent to asking how much of the imaginary spherical surface centered on the Mode i particle and having radius a_(i)+a_(j) lies inside the j-th cylinder. We will denote that interior portion of the surface by S_(ij). Then if a search shows there are h_(ij) Mode j particles touching a particular Mode i particle identified by index number i_(h), then our best estimate of the total number of touching Mode j spheres, if the entire surface were accessible, would be

η_(ij) =h _(ij)4π(a _(i) +a _(j))² /S _(ij).  VIII.C(1)

[0691] If the entire surface is accessible, then S_(ij)=4π(a_(i)+a_(j))² and η_(ij)=h_(ij). Because of round-off error, a certain center-to-center error tolerance ε is required to determine whether two spheres are indeed touching. The code considers them touching if their centers are within the distance (a_(i)+a_(j))(1+ε) from each other. Because the preferred implementation is in double precision, the default for ε is 10⁻¹², but the user can specify any other desired ε. Normally it should be a few orders of magnitude greater than machine precision.

[0692] The spherical surface S_(ij) lying inside a cylinder could be obtained from our earlier work on obtaining the spherical volume inside a cylinder by taking a derivative of the volume expressions with respect to the sphere radius. However, those expressions are complicated and have substantial bookkeeping associated with them. Because in this implementation there is an error tolerance, we may take a numerical derivative as follows:

S _(ij)=ε⁻¹ [V _(in)(x _(ih) ,y _(ih) ,z _(ih),(a _(i) +a _(j))(1+ε); a _(c)(j), z _(bot,j) ,z _(top,j))−V _(in)(x _(ih) , y _(ih) , z _(ih),(a _(i) +a _(j)); a _(c)(j), z _(bot,j) , z _(top,j))].  VIII.C(2)

[0693] The ε used in this expression should be kept very small even if the user chooses to be rather liberal in assigning a rather large error tolerance. One might, for example, assign this ε to be either the user-defined (or default) error tolerance or 10⁻⁶, whichever is smaller.

[0694] Finding Various Pack Statistics

[0695] There are a number of vital statistics of the pack that will generally be of interest. If the user so specifies, then the following data is written to a user-named file.

[0696] 1. A recapitulation of the particle histogram.

[0697] 2. A recapitulation of the values for control flags and parameters used in building the pack.

[0698] 3. The total number of particles placed in the pack and the number placed from each mode.

[0699] 4. The minimum and maximum radial and axial positions for the centers of all particles in the pack and the same for each mode.

[0700] 5. Radial and axial particle density functions for each mode specified between the minimum and maximum positions specified above.

[0701] 6. The number of particles placed after tunneling (if tunneling is permitted).

[0702] 7. The number of particles hitting one of the catch nets.

[0703] 8. The number of particles hitting one of the water levels.

[0704] 9. The number of preplaced particles, if any.

[0705] Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, representative devices and methods, and illustrative examples shown and described. Accordingly, departures may be made from such details without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents. 

What is claimed is:
 1. A machine-implemented method for placing a plurality of particles, each having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the method comprising: a) defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) selecting a particle from the plurality of particles; c) placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement including defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the selected particle placement further including defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the catch net and the water level; d) repeating the particle selection (b) and placement (c) until each of the particles of the plurality of particles has become one of the placed particles.
 2. A machine-implemented method for placing a plurality of particles, each having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the method comprising: a) defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) selecting a particle from the plurality of particles; c) placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement including defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the selected particle being placed in non-overlapping relation with respect to the catch net; d) repeating the particle selection (b) and placement (c) until each of the particles of the plurality of particles has become one of the placed particles.
 3. A method as recited in claim 2, wherein the particles comprise spheres and the characteristic dimension of each of the particles comprises a radius.
 4. A method as recited in claim 2, wherein the particle selection comprises randomly selecting the selected particle from the plurality of particles.
 5. A method as recited in claim 2, wherein: the method further includes defining a pack surface for the placed particles; and the catch net positioning comprises positioning the catch net relative to the pack surface.
 6. A method as recited in claim 5, wherein the catch net positioning comprises positioning the catch net a distance from the pack surface based upon a selected particle radius.
 7. A method as recited in claim 5, wherein: the placed particles comprise a top layer; and the pack surface comprises an average of the particle locations of the placed particles in the top layer.
 8. A method as recited in claim 5, wherein: each of the placed particles has a south pole located at a south pole position; the placed particles comprise a top layer of the placed particles; and the pack surface corresponds to the south poles of the top layer placed particles.
 9. A method as recited in claim 8, wherein the particle surface corresponds to an average of the south pole positions of the top layer placed particles.
 10. A method as recited in claim 2, wherein: the space has a cross sectional area substantially perpendicular to the central string; and the catch net extends across the cross sectional area of the space.
 11. A method as recited in claim 2, wherein: each of the subspaces has a cross sectional area substantially perpendicular to the central string; and the catch net extends across the cross sectional areas of each of the subspaces.
 12. A method as recited in claim 2, wherein: each of the subspaces has a cross sectional area substantially perpendicular to the central string; and the catch net comprises N subnets, one of the subnets corresponding to each of the subspaces.
 13. A method as recited in claim 13, wherein each of the subnets extends over the cross sectional area of the corresponding subspace.
 14. A method as recited in claim 13, wherein: each of the subnets has a level; and the levels of at least two of the subnets differ from one another.
 15. A method as recited in claim 14, wherein the catch net positioning comprises setting each of the subnets at a selected distance from the top surface.
 16. A method as recited in claim 2, wherein: the space includes a base surface and the catch net positioning comprises spacing the catch net from the base surface.
 17. A method as recited in claim 16, wherein the spacing from the base surface simulates a positioning of the catch net for a top layer of the placed particles.
 18. A method as recited in claim 2, wherein: the catch net positioning comprises assigning an initial catch net position for a kth one of the subspaces Z_(init)(k); assigning as the characteristic dimension of the particles of a kth one of the particle categories a_(k), assigning as the characteristic dimension of a small one of the particles a_(min) of the particles, and assigning as the characteristic dimension of a large one of the particles a_(max); and below a threshold level the catch net positioning further comprises positioning the catch net for a k_(th) one of the particle categories at a catch net position Z_(net)(k) within a k_(th) one of the subspaces determined by Z _(net)(k)=Z _(init) +Hra _(k) a _(min) /a _(max) where r represents a weighting coefficient and H represents a switching coefficient.
 19. A method as recited in claim 18, wherein the weighting coefficient is assigned a random number.
 20. A method as recited in claim 18, wherein: below the threshold value the switching coefficient is assigned a value of one; and above the threshold value the switching coefficient is assigned a value of zero.
 21. A method as recited in claim 5, wherein the pack surface defining comprises: selecting a top layer of the placed particles; for each particle category k of the placed particles in the top layer, defining a particle radius a_(i) for the placed particles i of that category k, for the subspace k corresponding to the particle category k, assigning a cylinder radius W_(k), assigning a top layer particle number m(k) and determining values for m(k) by evaluating ${{\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{{m{(k)}} - 1}}a_{i}^{2}} < W_{k}^{2} \leq {\underset{{{Submode}{(i)}} \leq k}{\sum\limits_{i = 1}^{m{(k)}}}a_{i}^{2}}},{k = 1},2,\ldots \quad,N$

where N is the number of particle categories; and determining the pack surface location using $S = {\frac{1}{m}{\sum\limits_{i = 1}^{m}\left( {Z_{i} - a_{i}} \right)}}$

where S represents the pack surface and Z_(i) represents the position of a center of a center one of the placed spheres.
 22. A method as recited in claim 5, wherein: for a given particle category k and corresponding subspace k, the particle placement comprises contacting an i_(th) placed particle with the selected particle, the i_(th) placed particle having the characteristic dimension a_(i) and the selected particle having the characteristic dimension a_(c); the catch net comprises a subnet corresponding to the subspace k; and if a_(i)/a_(c)<1, then the catch net positioning comprises positioning the subnet k for the k_(th) subspace Z_(net)(k) at Z _(net)(k)=S−a _(i) where S represents the position of the pack surface.
 23. A method as recited in claim 5, wherein: for a given particle category k and corresponding subspace k, the particle placement comprises contacting an i_(th) placed particle with the selected particle, the ith placed particle having the characteristic dimension a_(i) and the selected particle having the characteristic dimension a_(c); the catch net comprises a subnet corresponding to the subspace k; and if 1<a_(i)/a_(c)<a_(x), where a_(x) represents a sample particle size for a corresponding sample particle that will fit into a cavity formed by placed spheres larger than the sample particle, then the catch net positioning comprises positioning the subnet k for the kth subspace Z_(net)(k) at Z _(net)(k)=S−2a _(c) where S represents the position of the pack surface.
 24. A method as recited in claim 23, wherein the sample particle size a_(x) is assigned a value of {square root}6+2.
 25. A method as recited in claim 5, wherein: for a given particle category k and corresponding subspace k, the particle placement comprises contacting an ith placed particle with the selected particle, the i_(th) placed particle having the characteristic dimension a_(i) and the selected particle having the characteristic dimension a_(c); the catch net comprises a subnet corresponding to the subspace k; and if a_(i)/a_(c)≧a_(x), where a_(x) represents a sample particle size for a corresponding sample particle that will fit into a cavity formed by placed spheres larger than the sample particle, then the catch net positioning comprises positioning the subnet k for the kth subspace Z_(net)(k) at Z _(net)(k)=S−2a _(c) −a _(i) where S represents the position of the pack surface.
 26. An apparatus for placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the apparatus comprising: a) an input device for inputting particle selection information, b) a storage device operatively coupled to the input device for storing the particle selection information; c) a processor for selecting a particle from the plurality of particles, for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, and for establishing a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the processor placing the selected particle being placed in non-overlapping relation with respect to the catch net.
 27. A machine-readable medium for use in placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the machine-readable medium comprising: a) machine executable instructions for defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) machine executable instructions for selecting a particle from the plurality of particles; c) machine executable instructions for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement instructions including instructions for defining a catch net representative of buoyancy of a portion of the placed particles and positioning the catch net within the space based upon the placement of the portion of the placed particles, the selected particle being placed in non-overlapping relation with respect to the catch net; and d) machine executable instructions for repeating the particle selection (b) and placement (c) instructions until each of the particles of the plurality of particles has become one of the placed particles.
 28. A machine-implemented method for placing a plurality of particles, each having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the method comprising: a) defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) selecting a particle from the plurality of particles; c) placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement including defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the water level; d) repeating the particle selection (b) and placement (c) until each of the particles of the plurality of particles has become one of the placed particles.
 29. A method as recited in claim 28, wherein the particles comprise spheres and the characteristic dimension of each of the particles comprises a radius.
 30. A method as recited in claim 28, wherein: the water level positioning comprises determining an average location of the particle locations along the central string of the particles of the portion of placed particles and positioning the water level at the average location.
 31. A method as recited in claim 28, wherein: the water level comprises a plurality of subspace water levels corresponding to a portion of the subspaces, each of the subspace water levels corresponding to one of the subspaces of the portion of subspaces; and the water level positioning comprises assigning a subspace water level position to each of the subspace water levels.
 32. A method as recited in claim 31, wherein: each of the subspaces of the portion of subspaces comprises a subspace surface representative of the portion of the smaller placed particles within that subspace, each of the subspace surfaces comprising a subspace surface location with respect to the central string; each of the placed particles comprises a north pole having a north pole location; the subspace water level position for one of the subspaces i is in the portion of the subspaces determined by determining an average location of the north pole locations of the portion of the placed particles within the subspace i and assigning the average location as the subspace surface location for subspace i.
 33. A method as recited in claim 31, wherein: each of the subspaces of the portion of subspaces comprises a subspace surface representative of the portion of the smaller placed particles within that subspace, each of the subspace surfaces comprising a subspace surface location with respect to the central string; each of the placed particles comprises a south pole having a south pole location; the subspace water level position for one of the subspaces i is in the portion of the subspaces determined by determining an average location of the south pole locations of the portion of the placed particles within the subspace i and assigning the average location as the subspace surface location for subspace i.
 34. A method as recited in claim 28, wherein: the water level positioning comprises using an offset to position the water level.
 35. A method as recited in claim 31, wherein: the water level positioning comprises using an offset for each of the subspace water level positions.
 36. An apparatus for placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the apparatus comprising: a) an input device for inputting particle selection information, b) a storage device operatively coupled to the input device for storing the particle selection information; c) a processor for selecting a particle from the plurality of particles, for placing the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, for establishing a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and for positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the water level.
 37. A machine-readable medium for use in placing a plurality of particles, each particle having a characteristic dimension, to create a particle pack, the plurality of particles comprising N categories of the particles, the characteristic dimension of the particles of a given category being different from the characteristic dimensions of the particles of other ones of the categories, the characteristic dimension of the particles increasing as the category N increases, the machine-readable medium comprising: a) machine executable instructions for defining a central string, a space disposed about the central string, and N concentric subspaces disposed about the central string and within the space, each of the N subspaces corresponding to one of the N particle categories; b) machine executable instructions for selecting a particle from the plurality of particles; c) machine executable instructions for placing the selected particle at a particle location unique to the selected particle in the corresponding subspace so that the selected particle becomes a placed particle at a particle location unique to that placed particle and is in non-overlapping relation with other placed particles, the selected particle placement instructions including instructions for defining a water level representative of a level of a portion of the placed particles that are smaller than the selected particle and represent a surface of the smaller placed particles, and positioning the water level within the space based upon the smaller particle surface, the selected particle being placed in non-overlapping relation with respect to the water level; and d) machine executable instructions for repeating the particle selection (b) and placement (c) instructions until each of the particles of the plurality of particles has become one of the placed particles. 